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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1.5rem);
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Glow & Grid */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 600px;
  background: radial-gradient(circle 800px at 50% -100px, rgba(16, 185, 129, 0.15), transparent 70%),
              radial-gradient(circle 600px at 85% 10%, rgba(6, 182, 212, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Grid overlay */
.bg-grid-pattern {
  background-image: linear-gradient(to right, rgba(52, 211, 153, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(52, 211, 153, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2rem, 3.5vw + 0.5rem, 3rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.35rem, 2vw + 0.25rem, 1.75rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Accessibility Focus */
:focus-visible {
  outline: 2px solid var(--accent-mint);
  outline-offset: 3px;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  position: relative;
  z-index: 1;
}

.section {
  padding-block: var(--space-4xl);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-3xl);
}

.section-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-mint);
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: 1.15rem;
}

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

.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.05);
  }
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pingDot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

/* Live Status Dot */
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-mint);
  animation: pingDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================================
   RTL (Right-to-Left) Styles for Arabic and Urdu
   ========================================================================== */
[dir="rtl"] {
  text-align: right;
  font-family: 'Noto Sans Arabic', var(--font-sans);
}

[dir="rtl"] .hero-trust-item svg,
[dir="rtl"] .product-features-list li svg,
[dir="rtl"] .btn svg:not(.brand-emblem svg),
[dir="rtl"] .product-item a svg,
[dir="rtl"] .custom-products-banner a svg {
  transform: scaleX(-1);
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-option {
  text-align: right;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .mobile-nav-drawer {
  right: auto;
  left: -100%;
  border-left: none;
  border-right: 1px solid var(--border-brand);
  transition: left var(--transition-slow);
}

[dir="rtl"] .mobile-nav-drawer.open {
  left: 0;
}

[dir="rtl"] .hero-trust-row,
[dir="rtl"] .product-badge-row,
[dir="rtl"] .focus-card-header,
[dir="rtl"] .modal-header,
[dir="rtl"] .floating-telemetry,
[dir="rtl"] .impact-header-row,
[dir="rtl"] .ai-feature-card {
  direction: rtl;
}

[dir="rtl"] .ai-feature-card:hover {
  transform: translateX(-4px);
}

[dir="rtl"] .stat-card {
  text-align: right;
}

