/* MASAR AI - Enhanced Website Styles with Dynamic Animations */
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Primary Colors */
  --primary-blue: #3533cd;
  --primary-blue-light: #4a48d9;
  --primary-blue-dark: #1e1c9e;
  --primary-navy: #0d0b3e;
  --primary-navy-deep: #060524;
  --accent-yellow: #fff500;
  --accent-yellow-light: #fff94d;
  --danger-red: #ff4444;
  --success-green: #22c55e;
  --black: #000000;
  --white: #ffffff;

  /* Dark Theme (Default) */
  --bg-primary: #060524;
  --bg-secondary: #0d0b3e;
  --bg-tertiary: #1a1856;
  --text-primary: #ffffff;
  --text-secondary: #b8b8d0;
  --text-muted: #7878a0;
  --glass-bg: rgba(13, 11, 62, 0.6);
  --glass-border: rgba(53, 51, 205, 0.4);
  --glass-border-light: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(13, 11, 62, 0.6);
  --shadow-glow: 0 0 60px rgba(53, 51, 205, 0.4);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.3);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #3533cd 0%, #1e1c9e 50%, #0d0b3e 100%);
  --gradient-border: linear-gradient(45deg, var(--primary-blue), var(--accent-yellow), var(--primary-blue));

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Premium Motion System */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);

  /* Motion Timing Scale */
  --motion-fast: 0.15s;
  --motion-normal: 0.3s;
  --motion-slow: 0.5s;
  --motion-slower: 0.8s;

  /* 3D & Depth */
  --perspective: 1000px;
  --tilt-max: 8deg;
  --depth-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* Glow Intensities */
  --glow-soft: 0 0 20px;
  --glow-medium: 0 0 40px;
  --glow-intense: 0 0 60px;

  /* Cursor States */
  --cursor-size: 20px;
  --cursor-size-hover: 50px;
  --cursor-size-click: 15px;

  /* Fonts */
  --font-english: 'Red Hat Display', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'ff shamel family sans one', 'Cairo', 'Tajawal', sans-serif;

  /* Language-Agnostic Sizing - Prevents EN/AR layout shift */
  --nav-link-min-w: 70px;
  --btn-min-w: 180px;
  --btn-hero-min-w: 220px;
  --stat-card-w: 260px;
  --stat-card-h: 140px;
  --card-heading-min-h: 2.5em;
  --section-title-min-h: 1.5em;
}

/* ========================================
   LIGHT THEME - Fixed Contrast
======================================== */
html.light-theme {
  --bg-primary: #f8f9fc;
  --bg-secondary: #eef0f5;
  --bg-tertiary: #ffffff;
  --text-primary: #060524;
  --text-secondary: #4a4a6a;
  --text-muted: #6b6b8a;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(53, 51, 205, 0.2);
  --glass-border-light: rgba(53, 51, 205, 0.1);
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow-glow: 0 0 60px rgba(53, 51, 205, 0.15);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.08);
}

html.light-theme .section-title,
html.light-theme .hero-title,
html.light-theme h1,
html.light-theme h2,
html.light-theme h3,
html.light-theme h4 {
  color: #060524;
}

html.light-theme .section-subtitle,
html.light-theme p,
html.light-theme .hero-subtitle {
  color: #4a4a6a;
}

html.light-theme .glass-card {
  background: var(--card-bg);
  border-color: var(--glass-border);
}

html.light-theme .glass-card:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--primary-blue);
}

html.light-theme .navbar {
  background: rgba(248, 249, 252, 0.95);
}

html.light-theme .stat-number,
html.light-theme .result-number {
  color: var(--primary-blue);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Touch Devices - Disable hover effects to prevent scroll conflicts */
@media (hover: none) {

  /* Disable card hover animations on touch */
  .glass-card:hover::before {
    left: -100%;
  }

  .glass-card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }

  .hero-stat:hover {
    transform: none;
  }

  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }

  .nav-links a:hover::after {
    width: 0;
  }

  .problem-card:hover,
  .use-case-card:hover,
  .service-card:hover,
  .result-card:hover {
    transform: none;
  }

  /* Reduce interactive logo animations on touch */
  .interactive-logo:hover {
    transform: none;
  }

  .interactive-logo:hover .logo-glow {
    opacity: 0;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-english);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
  /* Mobile touch scrolling */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

/* Loading State */
body.loading .fade-in {
  opacity: 0;
  visibility: hidden;
}

body.loaded .fade-in {
  visibility: visible;
}

/* Arabic Support */
body.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
}

body.arabic .nav-links,
body.arabic .hero-ctas,
body.arabic .hero-stats,
body.arabic .footer-content,
body.arabic .footer-links {
  flex-direction: row-reverse;
}

/* Keep navbar position FIXED - use row-reverse to counteract RTL visual reversal */
body.arabic .navbar-container,
html[dir="rtl"] .navbar-container {
  flex-direction: row-reverse !important;
}

/* LOCK LOGO - same size and position in all languages */
body.arabic .logo,
html[dir="rtl"] .logo {
  font-size: 1.6rem !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  direction: ltr !important;
  text-align: left !important;
}

html[dir="rtl"] .connector-svg,
html[dir="rtl"] .flow-arrow-svg,
html[dir="rtl"] .visual-connector {
  transform: scaleX(-1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   CUSTOM CURSOR - Premium Motion
======================================== */
.custom-cursor {
  width: var(--cursor-size);
  height: var(--cursor-size);
  border: 2px solid var(--accent-yellow);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition:
    width var(--motion-normal) var(--ease-spring),
    height var(--motion-normal) var(--ease-spring),
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
  display: none;
  will-change: transform, width, height;
}

.custom-cursor::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--accent-yellow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform var(--motion-fast) var(--ease-spring);
}

.custom-cursor.visible {
  display: block;
}

.custom-cursor.hovering {
  width: var(--cursor-size-hover);
  height: var(--cursor-size-hover);
  background: rgba(255, 245, 0, 0.1);
  border-color: var(--accent-yellow);
}

.custom-cursor.hovering::before {
  transform: translate(-50%, -50%) scale(1.5);
}

.custom-cursor.clicking {
  width: var(--cursor-size-click);
  height: var(--cursor-size-click);
  background: rgba(255, 245, 0, 0.3);
}

.custom-cursor.magnetic {
  transition:
    width var(--motion-normal) var(--ease-spring),
    height var(--motion-normal) var(--ease-spring),
    transform 0.1s ease-out;
}

@media (max-width: 768px) {
  .custom-cursor {
    display: none !important;
  }
}

/* ========================================
   PARTICLES
======================================== */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleFloat 25s infinite ease-in-out;
}

.data-particle {
  position: absolute;
  font-size: 18px;
  opacity: 0.15;
  pointer-events: none;
  animation: floatData 30s ease-in-out infinite;
}

@keyframes particleFloat {

  0%,
  100% {
    transform: translateY(0) translateX(0);
    opacity: 0.2;
  }

  25% {
    transform: translateY(-180px) translateX(60px);
    opacity: 0.4;
  }

  50% {
    transform: translateY(-350px) translateX(-40px);
    opacity: 0.15;
  }

  75% {
    transform: translateY(-180px) translateX(-60px);
    opacity: 0.4;
  }
}

@keyframes floatData {

  0%,
  100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.1;
  }

  25% {
    transform: translateY(-120px) translateX(60px) rotate(90deg);
    opacity: 0.25;
  }

  50% {
    transform: translateY(-240px) translateX(-40px) rotate(180deg);
    opacity: 0.1;
  }

  75% {
    transform: translateY(-120px) translateX(-60px) rotate(270deg);
    opacity: 0.25;
  }
}

/* ========================================
   INTERACTIVE FLOATING LOGO
======================================== */
.interactive-logo {
  position: fixed;
  bottom: 40px;
  left: 40px;
  width: 80px;
  height: 80px;
  z-index: 100;
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring);
  will-change: transform;
}

.interactive-logo:hover {
  transform: scale(1.1);
}

.interactive-logo:active {
  transform: scale(0.95);
}

.logo-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring);
}

.logo-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease, transform 0.5s var(--ease-spring);
}

/* Dark theme (default) - show yellow circle logo */
.logo-dark-version {
  opacity: 1;
}

.logo-light-version {
  opacity: 0;
}

/* Light theme - show blue circle logo */
html.light-theme .logo-dark-version {
  opacity: 0;
}

html.light-theme .logo-light-version {
  opacity: 1;
}

/* Glow Effect */
.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 0, 0.4) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

html.light-theme .logo-glow {
  background: radial-gradient(circle, rgba(53, 51, 205, 0.4) 0%, transparent 70%);
}

.interactive-logo:hover .logo-glow {
  opacity: 1;
  animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
}

/* Logo Particles Container */
.logo-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Particle Burst */
.logo-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  pointer-events: none;
  animation: particleBurst 0.8s ease-out forwards;
}

@keyframes particleBurst {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Magnetic Effect Class */
.interactive-logo.magnetic {
  transition: transform 0.08s ease-out;
}

/* Click Animation */
.interactive-logo.clicked .logo-inner {
  animation: logoClick 0.4s var(--ease-spring);
}

@keyframes logoClick {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(0.85);
  }

  60% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

/* Rotation on hover */
.interactive-logo:hover .logo-inner {
  animation: logoSpin 8s linear infinite;
}

.interactive-logo:not(:hover) .logo-inner {
  animation: none;
}

@keyframes logoSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Hide on mobile */
@media (max-width: 768px) {
  .interactive-logo {
    width: 60px;
    height: 60px;
    bottom: 20px;
    left: 20px;
  }
}

/* RTL Support - Move logo to right side in Arabic */
html[dir="rtl"] .interactive-logo,
body.arabic .interactive-logo {
  left: auto;
  right: 40px;
}

@media (max-width: 768px) {

  html[dir="rtl"] .interactive-logo,
  body.arabic .interactive-logo {
    right: 20px;
    left: auto;
  }
}

/* ========================================
/* NAV CONTROLS - Fixed Position
======================================== */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 100px;
  flex-shrink: 0;
  justify-content: flex-end;

  /* RTL Isolation - Position NEVER changes */
  direction: ltr !important;
  unicode-bidi: isolate;
}

.theme-toggle {
  order: 1;
}

.lang-toggle {
  order: 2;
}

.theme-toggle,
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
}

.theme-toggle:hover,
.lang-toggle:hover {
  background: rgba(53, 51, 205, 0.3);
  border-color: var(--primary-blue);
  transform: translateY(-2px);
}

.dark-icon {
  display: block;
}

.light-icon {
  display: none;
}

html.light-theme .dark-icon {
  display: none;
}

html.light-theme .light-icon {
  display: block;
}

/* Language Labels - Fixed Position Text */
.lang-label {
  font-size: 0.85rem;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-en {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.lang-ar {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 1rem;
}

html[lang="ar"] .lang-en {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
}

html[lang="ar"] .lang-ar {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ========================================
   NAVBAR
======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(6, 5, 36, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border-light);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(6, 5, 36, 0.98);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand Logo - LOCKED TYPOGRAPHY (never changes) */
.logo {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  flex-shrink: 0;

  /* Typography Lock - NEVER CHANGE */
  font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 700 !important;
  font-size: 1.6rem !important;
  line-height: 1.2;
  letter-spacing: 0;
  direction: ltr !important;
  unicode-bidi: isolate;
}

.logo-text {
  color: var(--text-primary);
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
}

.logo-ai {
  color: var(--accent-yellow);
  font-family: inherit !important;
  font-weight: inherit !important;
  font-size: inherit !important;
  text-shadow: 0 0 25px rgba(255, 245, 0, 0.5);
  animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {

  0%,
  100% {
    text-shadow: 0 0 20px rgba(255, 245, 0, 0.5);
  }

  50% {
    text-shadow: 0 0 45px rgba(255, 245, 0, 0.8);
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  flex-grow: 1;
  justify-content: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  transition: var(--transition);
  position: relative;
  /* Language-agnostic sizing */
  min-width: var(--nav-link-min-w);
  text-align: center;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-yellow);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  padding: 12px 24px !important;
  background: var(--accent-yellow) !important;
  border-radius: var(--radius-sm);
  color: var(--black) !important;
  font-weight: 600 !important;
  animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 245, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 45px rgba(255, 245, 0, 0.5);
  }
}

.nav-cta::after {
  display: none !important;
}

/* زر التواصل - تصميم عصري مميز */
.nav-cta-secondary {
  padding: 12px 24px !important;
  background: transparent !important;
  border: 2px solid var(--primary-blue) !important;
  border-radius: var(--radius-sm);
  color: var(--primary-blue) !important;
  font-weight: 600 !important;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease !important;
}

.nav-cta-secondary::before {
  display: none;
  /* Remove the blue glow effect */
}

.nav-cta-secondary:hover {
  background: var(--primary-blue) !important;
  color: white !important;
  box-shadow: 0 0 25px rgba(53, 51, 205, 0.5);
  transform: translateY(-2px);
}

.nav-cta-secondary:hover::before {
  left: 100%;
}

.nav-cta-secondary::after {
  display: none !important;
}

/* Light theme */
html.light-theme .nav-cta-secondary {
  border-color: var(--primary-blue) !important;
  color: var(--primary-blue) !important;
}

html.light-theme .nav-cta-secondary:hover {
  background: var(--primary-blue) !important;
  color: white !important;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 140px 0 100px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(53, 51, 205, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 245, 0, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(53, 51, 205, 0.1) 0%, transparent 70%);
  animation: meshFloat 25s ease-in-out infinite;
}

@keyframes meshFloat {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.08) rotate(3deg);
  }
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  animation: heroGlowFloat 15s ease-in-out infinite;
  will-change: transform;
}

.hero-glow-1 {
  width: 800px;
  height: 800px;
  top: -300px;
  left: -200px;
  background: var(--primary-blue);
  opacity: 0.35;
}

.hero-glow-2 {
  width: 600px;
  height: 600px;
  bottom: -200px;
  right: -150px;
  background: var(--primary-blue-dark);
  opacity: 0.25;
  animation-delay: -7s;
}

.hero-glow-3 {
  width: 400px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-yellow));
  opacity: 0.12;
  animation-delay: -3.5s;
}

@keyframes heroGlowFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(60px, -60px) scale(1.1);
  }

  66% {
    transform: translate(-50px, 50px) scale(0.95);
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 51, 205, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 51, 205, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(80px);
  }
}

.hero-container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content {
  max-width: 950px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.animate-float {
  animation: float 7s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-15px);
  }
}

.badge-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-yellow);
  border-radius: 50%;
  animation: badgePulse 2s infinite;
  box-shadow: 0 0 18px var(--accent-yellow);
}

@keyframes badgePulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.4);
  }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw + 1rem, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 28px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-yellow-light), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
}

.animate-gradient {
  animation: gradientShift 5s ease-in-out infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.8;
}

.hero-ctas {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 36px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  /* Language-agnostic sizing */
  min-width: var(--btn-min-w);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-yellow);
  color: var(--black);
}

.btn-glow {
  animation: btnGlow 3.5s ease-in-out infinite;
}

@keyframes btnGlow {

  0%,
  100% {
    box-shadow: 0 0 25px rgba(255, 245, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 55px rgba(255, 245, 0, 0.55);
  }
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 65px rgba(255, 245, 0, 0.6);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(53, 51, 205, 0.25);
  border-color: var(--primary-blue);
  transform: translateY(-4px);
}

.btn-large {
  padding: 22px 48px;
  font-size: 1.1rem;
}

.btn-icon {
  font-size: 1.3rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Hero Stats - Interactive Metric Cards */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-stat {
  /* Language-agnostic fixed sizing */
  width: var(--stat-card-w);
  min-width: var(--stat-card-w);
  min-height: var(--stat-card-h);
  padding: 24px 20px;

  /* Appearance */
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-md);

  /* Interactive */
  cursor: pointer;
  position: relative;
  overflow: hidden;

  /* Smooth transitions */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Flex layout for content */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.hero-stat:hover {
  transform: translateY(-6px);
  border-color: var(--primary-blue);
  box-shadow: 0 12px 30px rgba(53, 51, 205, 0.15);
}

.hero-stat:active {
  transform: translateY(-2px) scale(0.98);
}

/* Particle container for click effects */
.stat-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent-yellow);
  line-height: 1.2;
  transition: transform 0.3s ease;
  letter-spacing: 0.02em;
}

.stat-number small {
  font-size: 0.65em;
  font-weight: 600;
  opacity: 0.85;
}

.hero-stat:hover .stat-number {
  transform: scale(1.05);
}

.stat-unit {
  font-size: 1.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Feedback text - Centered, Constrained, Replaces Label */
.stat-feedback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  margin-top: 20px;

  /* Constrained sizing */
  width: calc(100% - 24px);
  max-width: 140px;

  /* Font sizing with clamp */
  font-size: clamp(0.75rem, 2.5vw, 0.9rem);
  font-weight: 600;
  line-height: 1.4;

  /* Appearance */
  color: var(--text-primary);
  opacity: 0;
  text-align: center;

  /* Wrap text inside card */
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;

  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Click activated state */
.hero-stat.clicked .stat-feedback {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.hero-stat.clicked .stat-label {
  opacity: 0;
  transform: scale(0.8);
}

/* Metric-specific accent colors on click */
.hero-stat[data-metric="profit"].clicked {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 25px rgba(255, 245, 0, 0.2);
}

.hero-stat[data-metric="profit"].clicked .stat-feedback {
  color: var(--accent-yellow);
}

.hero-stat[data-metric="time"].clicked {
  border-color: var(--primary-blue);
  box-shadow: 0 0 25px rgba(53, 51, 205, 0.2);
}

.hero-stat[data-metric="time"].clicked .stat-feedback {
  color: var(--primary-blue-light);
}

.hero-stat[data-metric="uptime"].clicked {
  border-color: var(--success-green);
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.2);
}

.hero-stat[data-metric="uptime"].clicked .stat-feedback {
  color: var(--success-green);
}

/* Click ripple animation */
@keyframes statRipple {
  0% {
    transform: scale(0);
    opacity: 0.5;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Floating particles animation */
@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translateY(-60px) scale(0.5);
    opacity: 0;
  }
}

/* Emoji Particle Burst - for stat cards */
.stat-emoji-particle {
  position: absolute;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 10;
  animation: emojiExplosion 1s ease-out forwards;
}

@keyframes emojiExplosion {
  0% {
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  100% {
    transform: translate(var(--tx), var(--ty)) scale(1.2) rotate(var(--rotate));
    opacity: 0;
  }
}

/* Ripple effect on click */
.stat-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  animation: rippleExpand 0.6s ease-out forwards;
}

.hero-stat[data-metric="profit"] .stat-ripple {
  background: radial-gradient(circle, rgba(255, 245, 0, 0.4) 0%, transparent 70%);
}

.hero-stat[data-metric="time"] .stat-ripple {
  background: radial-gradient(circle, rgba(53, 51, 205, 0.4) 0%, transparent 70%);
}

.hero-stat[data-metric="uptime"] .stat-ripple {
  background: radial-gradient(circle, rgba(34, 197, 94, 0.4) 0%, transparent 70%);
}

@keyframes rippleExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(8);
    opacity: 0;
  }
}

/* Glow pulse on click */
.hero-stat.effect-active {
  animation: statPulseGlow 0.5s ease-out;
}

@keyframes statPulseGlow {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

/* Checkmark draw animation */
@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Hero Trust Disclaimer */
.hero-disclaimer {
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.6;
  text-align: center;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollBounce 2.5s ease-in-out infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 0.4;
  }

  50% {
    transform: translateX(-50%) translateY(12px);
    opacity: 1;
  }
}

/* ========================================
   SECTIONS COMMON
======================================== */
section {
  padding: 120px 0;
  position: relative;
}

.section-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(53, 51, 205, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 70px;
}

.section-tag {
  display: inline-block;
  padding: 8px 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-yellow);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-weight: 600;
}

.section-title {
  font-size: clamp(1.75rem, 3vw + 1rem, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  /* Language-agnostic sizing */
  min-height: var(--section-title-min-h);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.7;
  /* Language-agnostic sizing */
  min-height: 2em;
}

/* Glass Card with 3D Transform */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border-light);
  backdrop-filter: blur(12px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transition: 0.7s;
}

.glass-card:hover::before {
  left: 100%;
}

.glass-card:hover {
  border-color: var(--primary-blue);
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.25),
    0 0 80px rgba(53, 51, 205, 0.25);
}

/* Pulse Glow */
.pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(53, 51, 205, 0.4);
  }

  50% {
    box-shadow: 0 0 55px rgba(53, 51, 205, 0.7);
  }
}

/* ========================================
   FADE-IN ANIMATIONS - Smooth
======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
    transform 1s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in[data-delay="100"] {
  transition-delay: 0.1s;
}

.fade-in[data-delay="200"] {
  transition-delay: 0.2s;
}

.fade-in[data-delay="300"] {
  transition-delay: 0.3s;
}

.fade-in[data-delay="400"] {
  transition-delay: 0.4s;
}

.fade-in[data-delay="500"] {
  transition-delay: 0.5s;
}

/* ========================================
   PROBLEMS SECTION
======================================== */
.problems {
  background: var(--bg-secondary);
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: clamp(16px, 3vw, 24px);
}

.problem-card {
  padding: 32px;
  border-radius: var(--radius-lg);
}

.problem-icon {
  font-size: 2.5rem;
  margin-bottom: 18px;
  display: inline-block;
  transition: transform 0.5s ease;
}

.problem-card:hover .problem-icon {
  animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {

  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }

  25% {
    transform: scale(1.2) rotate(-8deg);
  }

  75% {
    transform: scale(1.2) rotate(8deg);
  }
}

.problem-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.problem-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.problem-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-border-light);
}

.stat-loss {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--danger-red);
}

.problem-stat span:last-child {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========================================
   SYSTEM SECTION
======================================== */
.system {
  background: var(--bg-primary);
}

/* ========================================
   STRICT SYSTEM FIELD (TECH MODE)
======================================== */
.system-field-container {
  position: relative;
  width: 100%;
  height: 650px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 60px 0;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(10, 10, 20, 1) 20%, transparent 70%);
  font-family: 'Courier New', monospace;
  /* Tech font */
}

/* 1. System Core (The brain) */
.sys-core-node {
  position: absolute;
  width: 120px;
  height: 120px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.core-geometry {
  position: relative;
  width: 80px;
  height: 80px;
}

.geo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.4s ease;
}

.geo-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  transition: all 0.4s ease;
}

.c1 {
  width: 100%;
  height: 100%;
  border-style: dashed;
}

.c2 {
  width: 140%;
  height: 140%;
  border-color: rgba(255, 255, 255, 0.05);
}

.core-status-text {
  margin-top: 50px;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

/* CORE STATES */
[data-state="idle"] .geo-center {
  background: #333;
  box-shadow: none;
}

[data-state="listening"] .geo-center {
  background: var(--white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(1.2);
}

[data-state="listening"] .c1 {
  border-color: var(--white);
  border-style: solid;
}

[data-state="listening"] .core-status-text {
  opacity: 1;
  color: var(--white);
}

[data-state="processing"] .geo-center {
  background: var(--accent-yellow);
  box-shadow: 0 0 30px var(--accent-yellow);
  animation: rapidPulse 0.2s infinite;
}

[data-state="routing"] .geo-center {
  background: var(--success-green);
}

/* 2. Signal Canvas */
#sys-signal-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 15;
}

/* 3. System Nodes (Tech Modules) */
.sys-modules-layer {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sys-node {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  /* Positioning handled by strict overrides below */
}

.node-marker {
  width: 8px;
  height: 8px;
  border: 1px solid var(--text-muted);
  background: #000;
  transform: rotate(45deg);
  transition: all 0.3s;
}

.node-content {
  display: flex;
  flex-direction: column;
}

.node-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.node-metrics {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  opacity: 0.5;
  font-size: 0.8rem;
}

.metric-val {
  color: var(--white);
  font-weight: 700;
}

/* NODE POSITIONS */
.sys-node[data-pos="top"] {
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
}

.sys-node[data-pos="top"] .node-marker {
  margin-bottom: 8px;
}

.sys-node[data-pos="bottom"] {
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column-reverse;
}

.sys-node[data-pos="bottom"] .node-marker {
  margin-top: 8px;
}

.sys-node[data-pos="top-left"] {
  top: 25%;
  left: 15%;
  flex-direction: row-reverse;
}

.sys-node[data-pos="top-right"] {
  top: 25%;
  right: 15%;
}

.sys-node[data-pos="bottom-left"] {
  bottom: 25%;
  left: 15%;
  flex-direction: row-reverse;
}

.sys-node[data-pos="bottom-right"] {
  bottom: 25%;
  right: 15%;
}


/* NODE STATES */
.sys-node.focused {
  border-color: var(--accent-yellow);
  background: rgba(255, 245, 0, 0.05);
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 245, 0, 0.1);
}

.sys-node.focused .node-marker {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
}

.sys-node.focused .node-label {
  color: var(--accent-yellow);
}

.sys-node.focused .node-metrics {
  opacity: 1;
}

.sys-node.dimmed {
  opacity: 0.2;
}

.sys-node.active {
  border-color: var(--success-green);
  background: rgba(0, 255, 136, 0.05);
  transform: scale(1.05);
}

.sys-node.active .node-marker {
  background: var(--success-green);
  border-color: var(--success-green);
}

.sys-node.active .metric-val {
  color: var(--success-green);
}

/* Animation Utils */
@keyframes rapidPulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .system-field-container {
    height: 600px;
  }

  .sys-node {
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    position: relative;
    margin: 10px auto;
    width: 80%;
  }

  .sys-modules-layer {
    display: flex;
    flex-direction: column;
    position: relative;
    height: auto;
    top: 140px;
  }

  .sys-core-node {
    top: 40px;
  }

  #sys-signal-canvas {
    display: none;
  }

  /* Canvas tricky on mobile list flow */
}


.node-icon {
  font-size: 1.3rem;
}

/* ========================================
   SYSTEM SHOWCASE - Interactive Flow
======================================== */
.system-showcase {
  margin: 60px 0;
}

/* Use Case Grid */
.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(20px, 3vw, 30px);
  margin-bottom: 40px;
}

/* Use Case Card */
.use-case-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.use-case-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(53, 51, 205, 0.03) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.use-case-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-blue);
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(53, 51, 205, 0.15);
}

.use-case-card:hover::after {
  opacity: 1;
}

/* Use Case Icon */
.use-case-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(53, 51, 205, 0.1);
  border: 1px solid rgba(53, 51, 205, 0.2);
  border-radius: var(--radius-md);
  transition: all 0.4s ease;
}

.use-case-icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary-blue-light);
  transition: all 0.4s ease;
}

.use-case-card:hover .use-case-icon {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  transform: scale(1.1);
}

.use-case-card:hover .use-case-icon svg {
  color: var(--white);
}

.use-case-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.use-case-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Use Case Flow Visualization */
.use-case-flow {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--glass-border-light);
  border-bottom: 1px solid var(--glass-border-light);
  margin-top: auto;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100%;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.flow-step span:last-child {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 80px;
}

.flow-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--glass-border);
  border: 2px solid var(--glass-border-light);
  transition: all 0.3s ease;
}

.flow-dot.active {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 15px rgba(255, 245, 0, 0.4);
  animation: flowPulse 2s ease-in-out infinite;
}

.flow-dot.success {
  background: var(--success-green);
  border-color: var(--success-green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

@keyframes flowPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

.flow-connector {
  width: 24px;
  flex-shrink: 0;
}

.flow-connector svg {
  width: 100%;
  height: 12px;
  color: var(--glass-border);
}

.use-case-card:hover .flow-connector svg {
  color: var(--primary-blue);
}

/* Use Case Metrics (Before/After) */
.use-case-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 12px;
}

.metric-before,
.metric-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  min-width: 90px;
}

.metric-before {
  border: 1px solid rgba(255, 82, 82, 0.2);
}

.metric-after {
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.metric-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.metric-value {
  font-size: 0.9rem;
  font-weight: 700;
}

.metric-value.bad {
  color: var(--danger-red);
}

.metric-value.good {
  color: var(--success-green);
}

.metric-arrow {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-arrow svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.use-case-card:hover .metric-arrow svg {
  color: var(--accent-yellow);
  transform: translateX(4px);
}

/* Live Results Panel */
.live-results-panel {
  padding: 32px;
  border-radius: var(--radius-lg);
  background: rgba(13, 11, 62, 0.6);
  border: 1px solid rgba(53, 51, 205, 0.3);
  position: relative;
  overflow: hidden;
}

.live-results-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow), var(--primary-blue));
  background-size: 200% 100%;
  animation: gradientFlow 3s linear infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 200% 0%;
  }
}

.results-header {
  margin-bottom: 24px;
}

.results-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-green);
  box-shadow: 0 0 10px var(--success-green);
}

.status-indicator.pulse {
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.results-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
}

.result-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border-light);
  transition: all 0.3s ease;
}

.result-metric:hover {
  border-color: var(--primary-blue);
  background: rgba(53, 51, 205, 0.05);
  transform: translateY(-4px);
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-yellow);
  line-height: 1;
}

.result-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Live Counter Animation */
.live-counter {
  display: inline-block;
}

/* RTL Support */
html[lang="ar"] .use-case-card {
  text-align: right;
}

html[lang="ar"] .use-case-flow {
  direction: rtl;
}

html[lang="ar"] .metric-arrow svg {
  /* Flip horizontally for RTL: arrow points from Before/قبل to After/بعد */
  transform: scaleX(-1);
}

html[lang="ar"] .use-case-card:hover .metric-arrow svg {
  transform: scaleX(-1) translateX(-4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .use-case-grid {
    grid-template-columns: 1fr;
  }

  .use-case-card {
    padding: 24px;
  }

  .use-case-flow {
    gap: 6px;
  }

  .flow-step span:last-child {
    font-size: 0.7rem;
    max-width: 65px;
  }

  .flow-connector {
    width: 16px;
  }

  .use-case-metrics {
    flex-wrap: wrap;
    flex-direction: column;
    align-items: stretch;
  }

  .metric-arrow {
    transform: rotate(90deg);
    margin: 8px auto;
  }

  /* On mobile vertical layout, arrow should ALWAYS point down regardless of language */
  html[lang="ar"] .metric-arrow svg {
    transform: none !important;
  }

  html[lang="ar"] .use-case-card:hover .metric-arrow svg {
    transform: translateY(4px) !important;
  }

  .metric-before,
  .metric-after {
    min-width: 80px;
    padding: 6px 12px;
  }

  .live-results-panel {
    padding: 24px;
  }

  .results-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .result-value {
    font-size: 1.6rem;
  }

  .result-label {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .use-case-flow {
    flex-direction: column;
    gap: 12px;
  }

  .flow-connector {
    transform: rotate(90deg);
    width: 24px;
    height: 16px;
  }

  .flow-step {
    flex-direction: row;
    gap: 12px;
  }

  .flow-step span:last-child {
    max-width: none;
  }
}

/* ========================================
   HIGH-FIDELITY LIVE CHAT
======================================== */
.live-chat-section {
  margin-top: 100px;
}

.live-chat-header {
  text-align: center;
  margin-bottom: 40px;
}

.live-chat-header h3 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.live-chat-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Segmented Controls */
.chat-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.chat-control-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.chat-control-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border);
}

.chat-control-btn.active {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: var(--white);
  box-shadow: 0 0 20px rgba(53, 51, 205, 0.4);
}

/* Chat Simulation Container */
.chat-simulation-container {
  max-width: 500px;
  margin: 0 auto;
  height: 600px;
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Simulation Header */
.simulation-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--glass-border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
}

.simulation-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--success-green);
}

.status-dot.pulse {
  animation: statusPulse 2s infinite;
}

.status-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.simulation-actions {
  display: flex;
  gap: 6px;
}

.sim-action {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glass-border);
  opacity: 0.5;
}

/* Viewport */
.simulation-viewport {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  scroll-behavior: smooth;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20px);
}

.simulation-viewport::-webkit-scrollbar {
  width: 4px;
}

.simulation-viewport::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 4px;
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(20px);
  animation: messageSlide 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  position: relative;
  transition: all 0.3s ease;
}

.chat-bubble.customer {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.05);
  /* Neutral dark glass */
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-right-radius: 4px;
}

.chat-bubble.store {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(53, 51, 205, 0.9) 0%, rgba(42, 40, 180, 0.9) 100%);
  /* Brand Color */
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 20px rgba(53, 51, 205, 0.3);
  /* Subtle glow */
}

@keyframes messageSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing Indicator */
.typing-dots {
  display: inline-flex;
  gap: 4px;
  padding: 4px 8px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
  opacity: 0.6;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* Input Area */
.simulation-input {
  padding: 16px 24px;
  border-top: 1px solid var(--glass-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
}

.input-placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
}

.cursor-blink {
  color: var(--primary-blue);
  animation: cursorBlink 1s infinite;
  margin-right: 2px;
  font-weight: 300;
}

.send-icon {
  width: 20px;
  height: 20px;
  fill: var(--primary-blue);
  opacity: 0.8;
}

/* Outcome Toast */
.outcome-toast {
  position: absolute;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.15) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.5);
  padding: 14px 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.1);
  z-index: 10;
}

.outcome-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  animation: toastPulse 2s ease-in-out infinite;
}

@keyframes toastPulse {

  0%,
  100% {
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.3), 0 0 0 1px rgba(16, 185, 129, 0.1);
  }

  50% {
    box-shadow: 0 8px 40px rgba(16, 185, 129, 0.5), 0 0 0 2px rgba(16, 185, 129, 0.2);
  }
}

.toast-icon {
  width: 22px;
  height: 22px;
  background: var(--success-green);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  flex-shrink: 0;
}

.toast-text {
  color: var(--success-green);
  font-size: 0.95rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

@keyframes statusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Disclaimer */
.chat-disclaimer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.6;
}

.demos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.demo-card {
  padding: 28px;
  border-radius: var(--radius-lg);
}

.demo-header {
  margin-bottom: 20px;
}

.demo-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success-green);
  color: var(--success-green);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.demo-header h4 {
  font-size: 1.1rem;
}

.demo-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.demo-msg {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  max-width: 90%;
  animation: msgSlide 0.6s ease-out forwards;
  opacity: 0;
}

.demo-msg:nth-child(1) {
  animation-delay: 0.3s;
}

.demo-msg:nth-child(2) {
  animation-delay: 0.8s;
}

@keyframes msgSlide {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.demo-msg.customer {
  background: var(--primary-blue);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.demo-msg.bot {
  background: var(--bg-tertiary);
  border: 1px solid var(--glass-border-light);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.demo-metric {
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border-light);
}

.demo-metric .metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-yellow);
}

.demo-metric .metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
}

/* Lead Flow */
.lead-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lead-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.lead-stage.highlight {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success-green);
}

.stage-icon {
  font-size: 1.5rem;
}

.flow-arrow-svg {
  width: 40px;
  height: 20px;
}

.flow-arrow-path {
  stroke: var(--accent-yellow);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 50;
  animation: flowArrow 2s ease-in-out infinite;
}

@keyframes flowArrow {

  0%,
  100% {
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dashoffset: 25;
  }
}

/* Status Flow */
.status-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.status-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--success-green);
  border-radius: 50%;
  font-size: 0.9rem;
}

.status-step.active .status-icon {
  background: var(--accent-yellow);
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.status-line {
  width: 40px;
  height: 3px;
  background: var(--success-green);
  border-radius: 2px;
}

.status-line.animated {
  animation: lineFill 1.5s ease-out forwards;
}

@keyframes lineFill {
  from {
    width: 0;
  }

  to {
    width: 40px;
  }
}

/* Analytics Bars */
.analytics-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.analytics-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.analytics-bar .bar-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 90px;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow));
  border-radius: 4px;
  animation: barGrow 1.5s ease-out forwards;
}

@keyframes barGrow {
  to {
    width: var(--fill-width);
  }
}

.analytics-bar .bar-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-yellow);
  min-width: 40px;
  text-align: right;
}

/* ========================================
   RESULTS SECTION
======================================== */
.results {
  background: var(--bg-secondary);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: clamp(16px, 3vw, 28px);
}

.result-card {
  text-align: center;
  padding: 44px 24px;
  border-radius: var(--radius-lg);
}

.result-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--accent-yellow);
  line-height: 1;
}

.result-suffix {
  font-size: 0.6em;
}

.result-card h4 {
  margin: 16px 0 8px;
  font-size: 1.05rem;
}

.result-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========================================
   SERVICES SECTION
======================================== */
.services {
  background: var(--bg-primary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(16px, 3vw, 28px);
}

.service-card {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
}

.service-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-block;
  transition: transform 0.5s ease;
}

.service-card:hover .service-icon {
  animation: iconBounce 0.6s ease;
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  /* Language-agnostic sizing */
  min-height: var(--card-heading-min-h);
}

.service-card>p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.service-features {
  list-style: none;
  margin-bottom: 0;
}

.service-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.service-card:hover .service-features li {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.service-features li:last-child {
  border: none;
}

.service-features li::before {
  content: "→ ";
  color: var(--accent-yellow);
  font-weight: 600;
}

.service-industries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.industry-tag {
  padding: 4px 12px;
  background: rgba(255, 245, 0, 0.08);
  border: 1px solid rgba(255, 245, 0, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--accent-yellow);
  font-weight: 600;
}

/* ========================================
   PROCESS SECTION
======================================== */
.process {
  background: var(--bg-secondary);
}

/* Visual Process Flow */
.process-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.visual-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.visual-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  border-radius: 50%;
  border: 2px solid var(--glass-border);
}

.visual-step span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.visual-connector {
  width: 60px;
  height: 20px;
}

.process-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary-blue), var(--accent-yellow), var(--primary-blue));
  opacity: 0.3;
}

.process-step {
  display: flex;
  gap: 28px;
  padding: 20px 0;
  position: relative;
}

.step-marker {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
  z-index: 1;
}

.step-content {
  flex: 1;
  padding: 24px;
  border-radius: var(--radius-md);
}

.step-content h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.step-duration {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255, 245, 0, 0.08);
  border: 1px solid rgba(255, 245, 0, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--accent-yellow);
  font-weight: 600;
}

/* ========================================
   CONTACT SECTION
======================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 60px;
  border-radius: var(--radius-xl);
  align-items: center;
}

.contact-title {
  font-size: 2rem;
  margin: 16px 0;
}

.contact-info>p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.contact-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-feature {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-cta-section {
  text-align: center;
}

.cta-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========================================
   FOOTER
======================================== */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--glass-border-light);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 12px;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-yellow);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--glass-border-light);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.back-to-top {
  color: var(--accent-yellow);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

/* ========================================
   FLOATING CTA
======================================== */
.floating-cta {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.floating-cta a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--accent-yellow);
  color: var(--black);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(255, 245, 0, 0.4);
  animation: floatPulse 4s ease-in-out infinite;
}

@keyframes floatPulse {

  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 8px 30px rgba(255, 245, 0, 0.4);
  }

  50% {
    transform: translateY(-6px);
    box-shadow: 0 14px 45px rgba(255, 245, 0, 0.55);
  }
}

.floating-cta .cta-icon {
  font-size: 1.2rem;
}

html[dir="rtl"] .floating-cta {
  right: auto;
  left: 30px;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-info {
    text-align: center;
  }

  .contact-features {
    align-items: center;
  }
}

@media (max-width: 768px) {

  /* Mobile navbar - position controls on the right */
  .navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Group nav-controls and mobile-menu-btn together on the right */
  .nav-controls {
    order: 2;
    margin-left: auto;
    margin-right: 12px;
  }

  .mobile-menu-btn {
    order: 3;
  }

  .logo {
    order: 1;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    padding: 24px;
    gap: 16px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 100px 0 60px;
  }

  .hero-stats {
    gap: 20px;
  }

  section {
    padding: 80px 0;
  }

  .integration-hub {
    padding: 30px;
  }

  .hub-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .contact-wrapper {
    padding: 30px;
  }

  .process-visual {
    gap: 10px;
  }

  .visual-step {
    padding: 0 10px;
  }

  .visual-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .visual-connector {
    width: 30px;
  }

  .timeline-line {
    left: 18px;
  }

  .step-marker {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .floating-cta {
    bottom: 20px;
    right: 20px;
  }

  .floating-cta a {
    padding: 14px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .btn {
    padding: 14px 24px;
    width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .scroll-indicator {
    display: none;
  }

  .lead-flow {
    flex-direction: column;
  }

  .flow-arrow-svg {
    transform: rotate(90deg);
  }
}

/* ========================================
   SERVICES SECTION
======================================== */
.services {
  background: var(--bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: clamp(20px, 3vw, 30px);
}

.service-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Service Icon - SVG Outline Style */
.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.service-icon svg {
  width: 32px;
  height: 32px;
  color: var(--white);
  stroke: currentColor;
  transition: var(--transition);
}

.service-card:hover .service-icon svg {
  color: var(--accent-yellow);
  transform: scale(1.1);
}

/* RTL Icon Positioning */
html[lang="ar"] .service-icon {
  margin-inline-start: auto;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  /* Language-agnostic sizing */
  min-height: var(--card-heading-min-h);
}

/* Service Features - Modern Bullet Points */
.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-features li {
  position: relative;
  padding-inline-start: 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Modern Circular Bullet Point */
.service-features li::before {
  content: '';
  position: absolute;
  top: 0.6em;
  inset-inline-start: 0;
  width: 6px;
  height: 6px;
  background: var(--primary-blue);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Bullet hover effect */
.service-card:hover .service-features li::before {
  background: var(--accent-yellow);
}

/* RTL Support for Services */
html[lang="ar"] .service-card {
  text-align: right;
}

html[lang="ar"] .service-features li {
  padding-inline-start: 20px;
  padding-inline-end: 0;
}

/* Service Card Mobile Responsive */
@media (max-width: 768px) {
  .service-card {
    padding: 24px;
  }

  .service-icon {
    width: 40px;
    height: 40px;
  }

  .service-icon svg {
    width: 28px;
    height: 28px;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .service-features li {
    font-size: 0.9rem;
  }
}

/* ========================================
   PREMIUM MOTION SYSTEM
======================================== */

/* 3D Card Tilt Effect */
.tilt-card {
  transform-style: preserve-3d;
  perspective: var(--perspective);
  transition: transform var(--motion-normal) var(--ease-out-expo);
}

.tilt-card-inner {
  transition: transform var(--motion-normal) var(--ease-out-expo);
  transform-style: preserve-3d;
}

.tilt-card:hover {
  z-index: 10;
}

/* Dynamic Light Reflection */
.light-reflection {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%);
  opacity: 0;
  transition: opacity var(--motion-normal) ease;
  pointer-events: none;
  border-radius: inherit;
}

.tilt-card:hover .light-reflection {
  opacity: 1;
}

/* Depth Shadow System */
.depth-shadow {
  transition: box-shadow var(--motion-normal) var(--ease-smooth);
}

.depth-shadow:hover {
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 30px 60px rgba(53, 51, 205, 0.1);
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
======================================== */

/* Base state for reveal elements */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity var(--motion-slower) var(--ease-out-expo),
    transform var(--motion-slower) var(--ease-out-expo);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for children */
.reveal-stagger>* {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--motion-slow) var(--ease-out-expo),
    transform var(--motion-slow) var(--ease-out-expo);
}

.reveal-stagger.revealed>*:nth-child(1) {
  transition-delay: 0.05s;
}

.reveal-stagger.revealed>*:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal-stagger.revealed>*:nth-child(3) {
  transition-delay: 0.15s;
}

.reveal-stagger.revealed>*:nth-child(4) {
  transition-delay: 0.2s;
}

.reveal-stagger.revealed>*:nth-child(5) {
  transition-delay: 0.25s;
}

.reveal-stagger.revealed>*:nth-child(6) {
  transition-delay: 0.3s;
}

.reveal-stagger.revealed>* {
  opacity: 1;
  transform: translateY(0);
}

/* Scale + Blur Entrance */
.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  filter: blur(10px);
  transition:
    opacity var(--motion-slower) var(--ease-out-expo),
    transform var(--motion-slower) var(--ease-out-expo),
    filter var(--motion-slower) var(--ease-out-expo);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* ========================================
   PREMIUM BUTTON INTERACTIONS
======================================== */

/* Button Press Depth */
.btn-depth {
  position: relative;
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition:
    transform var(--motion-fast) var(--ease-spring),
    box-shadow var(--motion-fast) var(--ease-spring);
}

.btn-depth:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.btn-depth:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Click Ripple Effect */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========================================
   KINETIC TYPOGRAPHY
======================================== */

/* Text Clip Reveal */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform var(--motion-slow) var(--ease-out-expo);
}

.text-reveal.revealed span {
  transform: translateY(0);
}

/* Gradient Text Shift */
.gradient-shift {
  background: linear-gradient(90deg,
      var(--accent-yellow) 0%,
      var(--primary-blue-light) 50%,
      var(--accent-yellow) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

  0%,
  100% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }
}

/* Counter Glow Pulse */
.counter-glow {
  transition: text-shadow var(--motion-normal) ease;
}

.counter-glow.counting {
  text-shadow:
    0 0 10px var(--accent-yellow),
    0 0 20px var(--accent-yellow),
    0 0 30px var(--accent-yellow);
}

.counter-glow.complete {
  animation: glowPulse 0.5s ease-out;
}

@keyframes glowPulse {
  0% {
    text-shadow:
      0 0 20px var(--accent-yellow),
      0 0 40px var(--accent-yellow);
  }

  100% {
    text-shadow: 0 0 10px var(--accent-yellow);
  }
}

/* ========================================
   SCROLL PROGRESS INDICATOR
======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow));
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ========================================
   PARALLAX LAYERS
======================================== */
.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
  transition: transform 0.1s linear;
}

.parallax-layer-back {
  transform: translateY(calc(var(--scroll-y, 0) * 0.3));
}

.parallax-layer-mid {
  transform: translateY(calc(var(--scroll-y, 0) * 0.5));
}

.parallax-layer-front {
  transform: translateY(calc(var(--scroll-y, 0) * 0.7));
}

/* ========================================
   REDUCED MOTION (Accessibility)
======================================== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-scale,
  .reveal-stagger>* {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .custom-cursor {
    display: none !important;
  }

  .parallax-layer {
    transform: none !important;
  }
}

/* ========================================
   SMOOTH SLIDE UP ANIMATION (Lists & Cards)
======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000),
    transform 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000);
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ========================================
   CHAT DEMO STYLES (Enforce Visibility)
======================================== */
.simulation-viewport {
  height: 400px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  /* Custom Scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-blue) transparent;
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  animation: messageSlide 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(10px);
}

/* Store Message (Left) */
.chat-bubble.store {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

/* Customer Message (Right) */
.chat-bubble.customer {
  align-self: flex-end;
  background: var(--primary-blue);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(53, 51, 205, 0.3);
}

@keyframes messageSlide {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tying Dots */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.6;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typingBounce {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1);
  }
}

/* ========================================
   LIGHT THEME CHAT FIXES
======================================== */
html.light-theme .simulation-viewport {
  background: rgba(0, 0, 0, 0.03);
  /* Slight grey for contrast */
}

html.light-theme .chat-bubble.store {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.05);
  color: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

html.light-theme .chat-bubble.customer {
  background: var(--primary-blue);
  /* Solid Blue */
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(53, 51, 205, 0.25);
}

.roi-calculator-section {
  margin-top: 4rem;
  width: 100%;
}

.roi-container {
  padding: 3rem;
  border-top: 1px solid var(--glass-border);
}

.roi-header {
  text-align: center;
  margin-bottom: 3rem;
}

.roi-header h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.roi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .roi-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.input-group {
  margin-bottom: 2rem;
}

.input-group label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-val {
  color: var(--primary-blue);
  font-weight: 700;
}

input[type=range] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--primary-blue);
  cursor: pointer;
  margin-top: -8px;
  box-shadow: 0 0 10px rgba(53, 51, 205, 0.5);
  transition: transform 0.2s;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.roi-result {
  text-align: center;
  background: rgba(53, 51, 205, 0.1);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(53, 51, 205, 0.3);
}

.roi-amount {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--accent-yellow);
  margin: 1rem 0;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.roi-note {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Vanta Canvas Fix */
.vanta-canvas {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  pointer-events: none;
}

/* ========================================
   LIGHT THEME & RTL FORMATTING FIXES
======================================== */
/* Fix Slider Visibility in Light Mode */
html.light-theme input[type=range]::-webkit-slider-runnable-track {
  background: rgba(0, 0, 0, 0.15);
}

html.light-theme input[type=range]::-moz-range-track {
  background: rgba(0, 0, 0, 0.15);
}

/* Fix Number/Unit Flipping in Arabic (Force LTR for metrics) */
.stat-number,
.result-value,
.metric-value,
.input-val,
.roi-amount {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* ========================================
   ROI LAYOUT & ICON VISIBILITY FIXES
======================================== */
/* 1. Fix ROI Label Moving */
.roi-result {
  display: flex !important;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 2.5rem !important;
  min-height: 240px;
  position: relative;
}

.roi-label {
  order: -1;
  margin-bottom: 1.5rem !important;
  flex: 0 0 auto;
}

.roi-amount {
  margin: 0 !important;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roi-note {
  margin-top: auto;
}

/* 2. Fix Icons in Light Mode */
html.light-theme .use-case-icon svg,
html.light-theme .service-icon svg {
  color: var(--primary-blue);
  opacity: 1;
}

html.light-theme .use-case-card:hover .use-case-icon svg,
html.light-theme .service-card:hover .service-icon svg {
  color: var(--primary-blue-dark);
  /* Darker blue on hover or yellow if preferred */
  /** User asked for "same as Points" which is yellow. */
  color: #dcb300;
  /* Darker yellow for visibility against white */
}

/* Remove background from Icons in Day Mode & Align Left */
html.light-theme .use-case-icon,
html.light-theme .service-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  margin-bottom: 12px;
  /* Maintain spacing */
}

html.light-theme .use-case-icon svg,
html.light-theme .service-icon svg {
  width: 32px;
  /* Slightly larger since no box? Or keep 24 */
  height: 32px;
}

/* On hover, keep transparent background, just change icon color */
html.light-theme .use-case-card:hover .use-case-icon,
html.light-theme .service-card:hover .service-icon {
  background: transparent !important;
  border: none !important;
  transform: translateY(-2px);
  transform: translateY(-2px);
  /* Slight lift instead of scale */
}


/* ========================================
   ROCKET LAUNCHPAD SYSTEM
======================================== */
.rocket-launchpad {
  padding: 3rem;
  display: flex;
  gap: 3rem;
  position: relative;
  min-height: 600px;
  overflow: hidden;
}

/* TRACK */
.launch-track-container {
  position: relative;
  width: 60px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.launch-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: rgba(53, 51, 205, 0.1);
  /* Track Rail */
  border-radius: 4px;
  z-index: 1;
}

.launch-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0%;
  /* JS will animate this */
  background: var(--accent-yellow);
  box-shadow: 0 0 15px var(--accent-yellow);
  width: 100%;
  border-radius: 4px;
  transition: height 0.1s linear;
}

/* ROCKET / AI AGENT */
.interactive-rocket {
  width: 50px;
  height: 50px;
  /* Square for the orb/brain */
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.interactive-rocket:hover {
  transform: translateX(-50%) scale(1.2);
}

.rocket-body {
  width: 100%;
  height: 100%;
  color: var(--primary-blue);
  filter: drop-shadow(0 0 10px rgba(53, 51, 205, 0.5));
}

.rocket-fill {
  fill: var(--glass-bg);
  /* Opaque body */
}

/* AI Glow State */
.rocket-engine-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--primary-blue);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
  filter: blur(5px);
}

/* AI Launching State */
.interactive-rocket.launching .rocket-engine-glow {
  opacity: 1;
  box-shadow: 0 0 30px var(--primary-blue), 0 0 15px #00ffff;
}

.interactive-rocket.launching .rocket-exhaust {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  /* Thinner data stream */
  height: 100px;
  background: linear-gradient(to bottom, var(--primary-blue), transparent);
  animation: dataStream 0.1s infinite alternate;
}

@keyframes dataStream {
  from {
    height: 80px;
    opacity: 1;
    width: 2px;
  }

  to {
    height: 120px;
    opacity: 0.5;
    width: 4px;
  }
}

/* Click Hint Ring */
.click-hint-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent-yellow);
  border-radius: 50%;
  animation: pingRing 2s infinite;
  pointer-events: none;
}

.interactive-rocket.launching .click-hint-circle {
  display: none;
}

@keyframes pingRing {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

/* STAGES */
.mission-stages {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
}

.mission-stage {
  display: flex;
  align-items: center;
  gap: 2rem;
  opacity: 0.4;
  /* Dimmed by default */
  transform: translateX(20px);
  transition: all 0.5s var(--ease-spring);
}

.mission-stage.active {
  opacity: 1;
  transform: translateX(0);
}

/* المراحل المكتملة تبقى مرئية */
.mission-stage.completed {
  opacity: 0.85;
  transform: translateX(0);
}

.mission-stage.completed .stage-node {
  background: var(--accent-yellow);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.mission-stage.completed .stage-icon {
  opacity: 1;
  transform: translateX(0);
}

.stage-node-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
}

.stage-node {
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 5;
  transition: all 0.3s;
}

.stage-icon {
  position: absolute;
  left: -40px;
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s;
}

.mission-stage.active .stage-node {
  background: var(--primary-blue);
  border-color: var(--accent-yellow);
  box-shadow: 0 0 20px rgba(53, 51, 205, 0.6);
  transform: scale(1.2);
}

.mission-stage.active .stage-icon {
  opacity: 1;
  transform: translateX(0);
}

.stage-card {
  flex: 1;
  padding: 1.5rem;
  position: relative;
  border-left: 4px solid transparent;
}

.mission-stage.active .stage-card {
  border-left-color: var(--accent-yellow);
  background: rgba(13, 11, 62, 0.8);
  /* Darker glass when active */
  box-shadow: var(--shadow-card);
}

/* Light Theme overrides */
html.light-theme .mission-stage.active .stage-card {
  background: #ffffff;
}

html.light-theme .rocket-fill {
  fill: #fff;
}

.stage-card h3 {
  margin-bottom: 0.5rem;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  width: fit-content;
}

.stage-meta {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.8rem;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--accent-yellow);
}

html.light-theme .stage-meta {
  background: rgba(53, 51, 205, 0.1);
  color: var(--primary-blue);
}

/* RTL Support */
html[dir="rtl"] .rocket-launchpad {
  /* Default flex behavior handles mirroring (Track on Right) */
  flex-direction: row;
}

html[dir="rtl"] .stage-card {
  border-left: none;
  border-right: 4px solid transparent;
}

html[dir="rtl"] .mission-stage.active .stage-card {
  border-right-color: var(--accent-yellow);
}

html[dir="rtl"] .stage-icon {
  left: auto;
  right: -40px;
  transform: translateX(10px);
}

html[dir="rtl"] .mission-stage {
  transform: translateX(-20px);
}

html[dir="rtl"] .mission-stage.active {
  transform: translateX(0);
}

/* Mobile */
@media (max-width: 768px) {
  .rocket-launchpad {
    padding: 1.5rem;
    gap: 1rem;
  }

  .stage-card {
    padding: 1rem;
  }

  .stage-icon {
    display: none;
    /* Simplify on mobile */
  }

  /* Fix rocket position: offset by half height (50px/2 = 25px) so it stays centered on the track */
  .interactive-rocket {
    margin-top: -25px;
  }
}

/* ========================================
   CHAT MESSAGE BOXES - Premium Styling
======================================== */

/* Message Container */
.chat-message {
  display: flex;
  margin-bottom: 12px;
  animation: messageSlideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Customer Messages - Right side (LTR) */
.customer-message {
  justify-content: flex-end;
}

.customer-message .message-bubble {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-light));
  color: #ffffff;
  border-radius: 20px 20px 6px 20px;
  box-shadow: 0 4px 20px rgba(53, 51, 205, 0.35);
  max-width: 75%;
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  position: relative;
}

/* AI Messages - Left side (LTR) */
.ai-message {
  justify-content: flex-start;
}

.ai-message .message-bubble {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  max-width: 75%;
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.55;
  position: relative;
  backdrop-filter: blur(10px);
}

/* AI Badge */
.ai-message .message-bubble::before {
  content: '🤖';
  position: absolute;
  top: -10px;
  left: 10px;
  background: var(--primary-blue);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 10px rgba(53, 51, 205, 0.4);
}

/* Customer Badge */
.customer-message .message-bubble::before {
  content: '👤';
  position: absolute;
  top: -10px;
  right: 10px;
  background: var(--accent-yellow);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 10px rgba(255, 245, 0, 0.4);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 8px 0;
  align-items: center;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0s;
}

/* Customer Typing - White dots */
.customer-message .typing-indicator span {
  background: rgba(255, 255, 255, 0.7);
}

/* ========================================
   RTL SUPPORT (Arabic) - Flip message sides
======================================== */
html[dir="rtl"] .customer-message {
  justify-content: flex-start;
}

html[dir="rtl"] .ai-message {
  justify-content: flex-end;
}

html[dir="rtl"] .customer-message .message-bubble {
  border-radius: 20px 20px 20px 6px;
  text-align: right;
}

html[dir="rtl"] .ai-message .message-bubble {
  border-radius: 20px 20px 6px 20px;
  text-align: right;
}

html[dir="rtl"] .ai-message .message-bubble::before {
  left: auto;
  right: 10px;
}

html[dir="rtl"] .customer-message .message-bubble::before {
  right: auto;
  left: 10px;
}

/* ========================================
   LIGHT THEME - Chat Messages
======================================== */
html.light-theme .ai-message .message-bubble {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

html.light-theme .customer-message .message-bubble {
  background: linear-gradient(135deg, var(--primary-blue), #4a48d9);
  box-shadow: 0 4px 20px rgba(53, 51, 205, 0.25);
}

/* ========================================
   OUTCOME TOAST STYLING
======================================== */
.outcome-toast {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.95));
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
}

.outcome-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  font-size: 1.2rem;
}

/* RTL Toast */
html[dir="rtl"] .outcome-toast {
  flex-direction: row-reverse;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .message-bubble {
    max-width: 85% !important;
    padding: 12px 14px !important;
    font-size: 0.9rem !important;
  }

  .ai-message .message-bubble::before,
  .customer-message .message-bubble::before {
    width: 20px;
    height: 20px;
    font-size: 10px;
    top: -8px;
  }

  .outcome-toast {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* ========================================
   COMPREHENSIVE RESPONSIVE STYLES
   Complete mobile-first responsive overrides
======================================== */

/* ============ TABLET (max-width: 1024px) ============ */
@media (max-width: 1024px) {

  /* Container */
  .container {
    padding: 0 20px;
  }

  /* Typography */
  .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
  }

  /* Hero Section */
  .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-stat {
    flex: 0 1 calc(50% - 10px);
    min-width: 150px;
  }

  /* Navigation */
  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.875rem;
  }

  /* Grids */
  .problems-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ROI Calculator */
  .roi-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Process Visual */
  .process-visual {
    flex-wrap: wrap;
    gap: 15px;
  }

  .visual-connector {
    display: none;
  }
}

/* ============ MOBILE (max-width: 768px) ============ */
@media (max-width: 768px) {

  /* CRITICAL: Prevent horizontal scroll/overflow on mobile */
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  /* Ensure all sections are clipped */
  section,
  .hero,
  .problems,
  .system,
  .results,
  .services,
  .process,
  .contact,
  .footer {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Clip background elements */
  .hero-bg,
  .section-glow,
  .particles-container {
    overflow: hidden;
    max-width: 100vw;
  }

  /* Base Typography */
  html {
    font-size: 15px;
  }

  body {
    font-size: 1rem;
  }

  /* Container */
  .container {
    padding: 0 16px;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Hero Section - Complete Mobile Overhaul */
  .hero {
    min-height: auto;
    padding: 100px 0 60px;
    text-align: center;
  }

  .hero-badge {
    padding: 10px 18px;
    font-size: 0.8rem;
    margin-bottom: 24px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    line-height: 1.2;
  }

  .hero-title .title-line {
    display: inline;
    margin-bottom: 8px;
  }

  .hero-title .title-line-1 {
    white-space: nowrap;
  }

  .gradient-text {
    font-size: clamp(2rem, 8vw, 3rem);
    display: inline;
    margin: 10px 0;
    white-space: nowrap;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    padding: 0 10px;
    line-height: 1.6;
    max-width: 100%;
  }

  /* Hero CTAs */
  .hero-ctas {
    flex-direction: column;
    gap: 12px;
    margin: 30px 0;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1rem;
  }

  /* Hero Stats */
  .hero-stats {
    flex-direction: column;
    gap: 16px;
    margin: 30px 0;
    width: 100%;
  }

  .hero-stat {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    padding: 20px;
    text-align: center;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .stat-feedback {
    font-size: 0.75rem;
  }

  .hero-disclaimer {
    font-size: 0.75rem;
    padding: 0 10px;
  }

  /* Section Styling */
  section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
    text-align: center;
  }

  .section-tag {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    padding: 0 10px;
  }

  .section-subtitle {
    font-size: 0.9rem;
    padding: 0 10px;
  }

  /* Problems Grid */
  .problems-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .problem-card {
    padding: 24px;
  }

  .problem-icon {
    font-size: 2rem;
  }

  .problem-card h3 {
    font-size: 1.1rem;
  }

  .problem-stat {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  /* Results Grid */
  .results-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .result-card {
    padding: 24px;
    text-align: center;
  }

  .result-number {
    font-size: 2.5rem;
  }

  /* Services Grid */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Process Section */
  .process-visual {
    flex-direction: column;
    gap: 20px;
  }

  .visual-step {
    padding: 15px;
  }

  .process-step {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .step-marker {
    margin: 0 auto;
  }

  .timeline-line {
    display: none;
  }

  .step-content {
    text-align: center;
  }

  /* Footer */
  .footer {
    padding: 40px 0 20px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }

  .footer-brand {
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  /* Buttons */
  .btn {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .btn-primary {
    width: 100%;
  }

  /* Glass Cards */
  .glass-card {
    padding: 20px;
  }

  /* ROI Calculator */
  .roi-container {
    padding: 24px;
  }

  .roi-header h3 {
    font-size: 1.3rem;
  }

  .roi-amount {
    font-size: 2rem;
  }

  /* Chat Simulation */
  .chat-simulation-container {
    margin: 0 -8px;
    border-radius: 16px;
  }

  .simulation-viewport {
    height: 400px;
    padding: 16px;
  }

  .chat-controls {
    gap: 6px;
    padding: 0 10px;
  }

  .chat-control-btn {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  /* Live Results Panel */
  .results-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .result-metric {
    padding: 12px;
  }

  .result-value {
    font-size: 1.4rem;
  }

  /* Scroll Indicator */
  .scroll-indicator {
    display: none;
  }

  /* Floating CTA */
  .floating-cta {
    bottom: 16px;
    right: 16px;
  }

  .floating-cta a {
    padding: 12px 18px;
    font-size: 0.85rem;
    gap: 8px;
  }

  .floating-cta .cta-text {
    display: none;
  }

  .floating-cta .cta-icon {
    font-size: 1.4rem;
  }

  /* Hide glow effects on mobile for performance */
  .hero-glow {
    opacity: 0.15;
    filter: blur(100px);
  }

  /* Live Chat Header */
  .live-chat-header h3 {
    font-size: 1.3rem;
    padding: 0 10px;
  }

  .live-chat-subtitle {
    font-size: 0.9rem;
    padding: 0 10px;
  }

  /* Chat Disclaimer */
  .chat-disclaimer {
    font-size: 0.75rem;
    padding: 0 10px;
  }
}

/* ============ SMALL MOBILE (max-width: 480px) ============ */
@media (max-width: 480px) {

  /* Even smaller typography */
  .container {
    padding: 0 12px;
  }

  /* Hero adjustments */
  .hero {
    padding: 90px 0 50px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .gradient-text {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.875rem;
  }

  .hero-badge {
    padding: 8px 14px;
    font-size: 0.75rem;
  }

  /* Stats */
  .hero-stat {
    padding: 16px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Section headers */
  .section-title {
    font-size: 1.4rem;
  }

  .section-subtitle {
    font-size: 0.85rem;
  }

  /* Cards */
  .problem-card,
  .result-card,
  .service-card {
    padding: 20px;
  }

  /* Results */
  .result-number {
    font-size: 2rem;
  }

  /* ROI */
  .roi-amount {
    font-size: 1.75rem;
  }

  /* Live Results */
  .results-metrics {
    grid-template-columns: 1fr;
  }

  /* Chat controls - horizontal scroll */
  .chat-controls {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .chat-controls::-webkit-scrollbar {
    display: none;
  }

  .chat-control-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* Simulation viewport */
  .simulation-viewport {
    height: 350px;
    padding: 12px;
  }

  /* Process steps */
  .step-content {
    padding: 16px;
  }

  .step-content h3 {
    font-size: 1rem;
  }

  .step-content p {
    font-size: 0.875rem;
  }

  /* Footer */
  .footer {
    padding: 30px 0 15px;
  }

  .footer-brand .logo {
    font-size: 1.3rem;
  }

  .footer-bottom p {
    font-size: 0.75rem;
  }

  /* Buttons */
  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  /* Navbar on very small screens */
  .navbar {
    padding: 12px 0;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-controls {
    gap: 8px;
  }

  .theme-toggle,
  .lang-toggle {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  /* Use case cards */
  .use-case-card {
    padding: 20px;
  }

  .use-case-icon {
    width: 40px;
    height: 40px;
  }

  .use-case-icon svg {
    width: 20px;
    height: 20px;
  }

  .use-case-card h4 {
    font-size: 1.05rem;
  }

  /* Metrics in cards */
  .use-case-metrics {
    flex-direction: column;
    gap: 8px;
  }

  .metric-arrow {
    transform: rotate(90deg);
  }

  .metric-before,
  .metric-after {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============ LANDSCAPE MOBILE ============ */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 80px 0 40px;
  }

  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-stat {
    flex: 0 1 30%;
  }
}

/* ============ RTL MOBILE SPECIFIC ============ */
@media (max-width: 768px) {

  /* CRITICAL: Force nav-links to be vertical in RTL mobile */
  html[dir="rtl"] .nav-links,
  body.arabic .nav-links,
  html[lang="ar"] .nav-links {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  html[dir="rtl"] .nav-links a,
  body.arabic .nav-links a,
  html[lang="ar"] .nav-links a {
    text-align: center;
    width: 100%;
  }

  html[dir="rtl"] .nav-cta,
  body.arabic .nav-cta,
  html[lang="ar"] .nav-cta {
    width: auto;
    min-width: 200px;
  }

  html[dir="rtl"] .hero-ctas,
  body.arabic .hero-ctas {
    flex-direction: column;
  }

  html[dir="rtl"] .hero-stats,
  body.arabic .hero-stats {
    flex-direction: column;
  }

  html[dir="rtl"] .footer-content,
  body.arabic .footer-content {
    flex-direction: column;
  }

  html[dir="rtl"] .footer-links,
  body.arabic .footer-links {
    flex-direction: column;
  }

  html[dir="rtl"] .process-step,
  body.arabic .process-step {
    flex-direction: column;
  }

  html[dir="rtl"] .floating-cta,
  body.arabic .floating-cta {
    left: 16px;
    right: auto;
  }

  /* RTL navbar container should not reverse on mobile */
  html[dir="rtl"] .navbar-container,
  body.arabic .navbar-container {
    flex-direction: row;
  }
}