:root {
  /* Brand Colors - Light Green Theme */
  --bg-dark: #d1fae5; /* Emerald 100 */
  --bg-darker: #f3f4f6; /* Gray 100 */
  --bg-card: rgba(243, 244, 246, 0.85); /* Gray 100 with opacity for glassmorphism */
  --primary: #059669; /* Emerald 600 */
  --primary-hover: #047857; /* Emerald 700 */
  --secondary: #10b981; /* Emerald 500 */
  --accent: #064e3b; /* Emerald 900 */
  
  /* Text Colors */
  --text-main: #064e3b; /* Emerald 900 */
  --text-muted: #374151; /* Gray 700 */
  
  /* Design Tokens */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Glassmorphism */
  --glass-border: rgba(16, 185, 129, 0.2); /* Soft green border */
  --glass-shadow: 0 8px 32px 0 rgba(16, 185, 129, 0.15); /* Soft green shadow */
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables Override */
body.dark-mode {
  --bg-dark: #111111; /* Sleek extremely dark gray */
  --bg-darker: #000000; /* Pure black */
  --bg-card: rgba(24, 24, 27, 0.7); /* Zinc 900 glassmorphism */
  --text-main: #f4f4f5; /* Clean off-white */
  --text-muted: #a1a1aa; /* Neutral mid-gray */
  --primary: #10b981; /* Vibrant Emerald 500 to POP against black */
  --primary-hover: #34d399; /* Vibrant Emerald 400 */
  --secondary: #059669; /* Darker Emerald 600 */
  --glass-border: rgba(16, 185, 129, 0.25);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.9); /* Heavy shadow for depth on dark background */
}

body.dark-mode .btn-primary,
body.dark-mode .logo-icon {
  color: #000000; /* High contrast black text against bright emerald background */
}

/* Arabic Font Class */
body.font-arabic {
  font-family: 'Cairo', var(--font-sans);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darker);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients */
.bg-gradient-spot {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.bg-gradient-top {
  top: -200px;
  left: -100px;
}

.bg-gradient-bottom {
  bottom: -200px;
  right: -100px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  background: linear-gradient(135deg, var(--text-main) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

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

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

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 6rem 0;
  position: relative;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  background: rgba(243, 244, 246, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: all var(--transition-normal);
}

body.dark-mode .navbar {
  background: rgba(0, 0, 0, 0.8);
}

.utility-toggles {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 600;
}

.btn-icon:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.05);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-text {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Cards (Glassmorphism) */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(243,244,246,0.5) 0%, transparent 100%);
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--glass-shadow);
  border-color: rgba(16, 185, 129, 0.4);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
  transition: transform var(--transition-normal);
}

.glass-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

.glass-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

/* Platforms Section */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.platform-card {
  text-align: left;
}

.platform-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Indicators Section */
.indicators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.indicator-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.indicator-features li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.indicator-features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: bold;
}

/* Mobile Apps */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.app-card {
  text-align: center;
  align-items: center;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  margin: 0 auto 1.5rem auto;
  background: linear-gradient(135deg, #a7f3d0, #d1fae5);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
  color: var(--primary);
  transition: transform var(--transition-normal);
}

body.dark-mode .app-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), transparent);
}

.app-card:hover .app-icon {
  transform: scale(1.1) translateY(-5px);
}

.store-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.store-btn:hover {
  background: rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

/* Features section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-item {
  text-align: center;
}

.feature-item .card-icon {
  margin: 0 auto 1rem auto;
}

/* CTA Section */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

/* Footer */
footer {
  padding: 4rem 0 2rem 0;
  background: var(--bg-darker);
  border-top: 1px solid var(--glass-border);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul a {
  color: var(--text-muted);
}

.footer-col ul a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* Responsive UI */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  section {
    padding: 4rem 0;
  }
}
