/* ============================================================
   AntOptimizer — Landing Page Styles
   Design: Cyber-industrial dark tech with electric cyan accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Fira+Code:wght@300;400;500&family=Amiri:wght@400;700&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --bg-base:        #040c12;
  --bg-surface:     #071520;
  --bg-card:        rgba(0, 229, 255, 0.03);
  --bg-hover:       rgba(0, 229, 255, 0.07);
  --bg-glass:       rgba(7, 21, 32, 0.75);
  --teal:           rgb(217, 21, 144);
  --teal-dim:       rgba(0, 229, 255, 0.12);
  --teal-border:    rgba(0, 229, 255, 0.25);
  --orange:         #ff6b2b;
  --orange-dim:     rgba(255, 107, 43, 0.12);
  --red:            #e74c3c;
  --text-primary:   #e8f4f8;
  --text-secondary: #8aa8b8;
  --text-muted:     #4a6a7a;
  --border-subtle:  rgba(0, 229, 255, 0.10);
  --border-mid:     rgba(0, 229, 255, 0.22);
  --shadow-teal:    0 0 30px rgba(0, 229, 255, 0.2);
  --shadow-glow:    0 0 60px rgba(0, 229, 255, 0.15);
  --r-sm:           4px;
  --r-md:           8px;
  --r-lg:           12px;
  --r-xl:           16px;
  --r-2xl:          24px;
  --sp-1:           4px;
  --sp-2:           8px;
  --sp-3:           12px;
  --sp-4:           16px;
  --sp-5:           20px;
  --sp-6:           24px;
  --sp-8:           32px;
  --t-xs:           0.15s ease;
  --t-sm:           0.25s ease;
  --t-md:           0.4s ease;
  --font-display:   'Orbitron', sans-serif;
  --font-body:      'Rajdhani', sans-serif;
  --font-mono:      'Fira Code', monospace;
  --font-arabic:    'Amiri', serif;
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-base:        #f0f7ff;
  --bg-surface:     #e2eef8;
  --bg-card:        rgba(0, 100, 140, 0.04);
  --bg-hover:       rgba(0, 100, 140, 0.08);
  --bg-glass:       rgba(240, 247, 255, 0.85);
  --teal:           #006080;
  --teal-dim:       rgba(0, 96, 128, 0.10);
  --teal-border:    rgba(0, 96, 128, 0.25);
  --text-primary:   #0a1a28;
  --text-secondary: #2a4a68;
  --text-muted:     #5a7a98;
  --border-subtle:  rgba(0, 96, 128, 0.12);
  --border-mid:     rgba(0, 96, 128, 0.25);
  --shadow-teal:    0 0 30px rgba(0, 96, 128, 0.15);
  --bg-base-solid:  #f0f7ff;
}

/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── SCROLL PROGRESS BAR ───────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--orange));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--teal);
}

/* ── NAVIGATION ────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
}

#navbar.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.nav-logo-text span { color: var(--teal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color var(--t-xs);
  text-transform: uppercase;
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  transition: all var(--t-xs);
  letter-spacing: 0.02em;
}

.nav-btn:hover {
  background: var(--teal-dim);
  border-color: var(--teal-border);
  color: var(--teal);
}

.lang-btn {
  width: auto;
  padding: 0 12px;
  font-size: 0.75rem;
}

.nav-download-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--teal), #0096aa);
  border: none;
  border-radius: var(--r-md);
  color: #040c12;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t-sm);
  white-space: nowrap;
}

.nav-download-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-teal);
}

/* Mobile nav toggle */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--t-sm);
}

/* ── PARTICLES CANVAS ──────────────────────────────────────── */
#particles-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── HERO SECTION ──────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,229,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 80% 50%, rgba(255,107,43,0.06) 0%, transparent 50%),
    var(--bg-base);
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid var(--teal-border);
  border-radius: 100px;
  background: var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 28px;
  animation: fadeInDown 0.8s ease both;
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--teal);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero-logo {
  width: 250px;
  height: 250px;
  border-radius: 24px;
  margin: 0 auto 28px;
  display: block;
  object-fit: cover;
  border: 2px solid var(--teal-border);
  box-shadow: var(--shadow-teal), 0 0 0 8px rgba(0,229,255,0.05);
  animation: fadeInDown 0.8s 0.1s ease both, float 6s 1s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
  animation: fadeInUp 0.8s 0.2s ease both;
}

.hero-title .accent { color: var(--teal); }
.hero-title .accent-orange { color: var(--orange); }

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 44px;
  line-height: 1.7;
  animation: fadeInUp 0.8s 0.35s ease both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.5s ease both;
}

/* Main Download Button */
.btn-download-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--teal), #0096aa);
  border: none;
  border-radius: var(--r-lg);
  color: #040c12;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-download-hero::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--teal), var(--orange), var(--teal));
  background-size: 200%;
  border-radius: inherit;
  z-index: -1;
  animation: borderFlow 3s linear infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-download-hero:hover::before { opacity: 1; }

.btn-download-hero::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.15);
  border-radius: inherit;
  transition: transform 0.5s ease, opacity 0.5s;
  opacity: 0;
}

.btn-download-hero:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 40px rgba(0,229,255,0.4), 0 12px 40px rgba(0,229,255,0.2);
}

.btn-download-hero:active::after {
  transform: translate(-50%, -50%) scale(2);
  opacity: 0;
  transition: 0s;
}

.btn-glow-ring {
  position: absolute;
  inset: -6px;
  border: 1px solid var(--teal);
  border-radius: calc(var(--r-lg) + 6px);
  opacity: 0;
  animation: glowRing 2.5s ease-in-out infinite;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  background: transparent;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--t-sm);
  letter-spacing: 0.04em;
}

.btn-outline:hover {
  border-color: var(--teal-border);
  color: var(--teal);
  background: var(--teal-dim);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  animation: fadeInUp 0.8s 0.65s ease both;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-subtle);
}

/* ── SECTION COMMONS ───────────────────────────────────────── */
section {
  position: relative;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.section-tag::before {
  content: '//';
  opacity: 0.5;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-title .accent { color: var(--teal); }

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.75;
}

/* Animated separator */
.separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-border), transparent);
  position: relative;
  overflow: hidden;
}

.separator::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  animation: scanLine 4s linear infinite;
}

/* ── FEATURES SECTION ──────────────────────────────────────── */
#features {
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 60px;
}

.feature-card {
  position: relative;
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: all 0.35s ease;
  cursor: default;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-border), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover::before { transform: scaleX(1); }

.feature-card:hover {
  background: var(--bg-hover);
  border-color: var(--teal-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-teal);
}

.feature-card-glow {
  position: absolute;
  top: -40%; left: -20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,229,255,0.08) 0%, transparent 70%);
  pointer-events: none;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-card-glow {
  opacity: 1.5;
  transform: scale(1.3);
}

.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--r-lg);
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  transition: all var(--t-sm);
}

.feature-card:hover .feature-icon {
  box-shadow: var(--shadow-teal);
  transform: scale(1.05);
}

.feature-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── PERFORMANCE SECTION ───────────────────────────────────── */
#performance {
  background: var(--bg-surface);
}

.perf-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 60px;
}

.perf-chart-wrapper {
  position: relative;
}

.perf-bars {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.perf-bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perf-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.perf-bar-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.perf-bar-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--teal);
  font-weight: 500;
}

.perf-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.perf-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}

.perf-bar-fill.cyan {
  background: linear-gradient(90deg, var(--teal), #00b4cc);
}

.perf-bar-fill.orange {
  background: linear-gradient(90deg, var(--orange), #ff8c5a);
}

.perf-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
  animation: shimmer 2s infinite;
}

.perf-text-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.perf-stat-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--t-sm);
}

.perf-stat-card:hover {
  border-color: var(--teal-border);
  background: var(--bg-hover);
}

.perf-stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  min-width: 80px;
}

.perf-stat-info {
  flex: 1;
}

.perf-stat-info h4 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.perf-stat-info p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── GALLERY SECTION ───────────────────────────────────────── */
#gallery {
  background: var(--bg-base);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 50px;
}

.gallery-item {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16/10;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  background: var(--bg-surface);
  transition: all var(--t-sm);
}

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover {
  border-color: var(--teal-border);
  box-shadow: var(--shadow-teal);
  transform: translateY(-4px);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity var(--t-sm);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Modal */
#gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-md);
}

#gallery-modal.open {
  opacity: 1;
  pointer-events: all;
}

#gallery-modal img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-mid);
  box-shadow: 0 0 80px rgba(0,229,255,0.2);
  object-fit: contain;
  transform: scale(0.9);
  transition: transform var(--t-md);
}

#gallery-modal.open img { transform: scale(1); }

.modal-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-xs);
}

.modal-close:hover {
  background: rgba(0,229,255,0.2);
  border-color: var(--teal-border);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-xs);
}

.modal-nav:hover { background: var(--teal-dim); border-color: var(--teal-border); }
.modal-prev { left: 20px; }
.modal-next { right: 20px; }

/* ── HOW IT WORKS ──────────────────────────────────────────── */
#how-it-works {
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 100%);
}

.steps-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 60px;
  position: relative;
}

.steps-container::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--teal-border), transparent);
}

.step-item {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 28px 28px 28px 0;
  position: relative;
  transition: all var(--t-sm);
}

.step-num {
  width: 60px; height: 60px;
  min-width: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  position: relative;
  z-index: 1;
  transition: all var(--t-sm);
}

.step-item:hover .step-num {
  background: var(--teal-dim);
  box-shadow: var(--shadow-teal);
}

.step-body {
  flex: 1;
  padding-top: 14px;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
/* ── How It Works: header row (text + namlasolo image) ── */
.how-header-row {
  display: flex;
  align-items: stretch;
  gap: 40px;
  justify-content: space-between;
}
.how-header-row .reveal {
  flex: 1;
  min-width: 0;
}
.how-img-solo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.how-img-solo img {
  width: 260px;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-xl);
  filter: drop-shadow(0 0 24px rgba(0,229,255,0.25));
}

/* ── How It Works: content row (steps + namlaqamla image) ── */
.how-content-row {
  display: flex;
  align-items: stretch;
  gap: 40px;
  margin-top: 0;
  justify-content: space-between;
}
.how-content-row .steps-container {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}
.how-img-main {
  display: none; /* shown only on large screens — see @media (min-width: 1024px) */
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.how-img-main img {
  width: 700px;
  height: 1000px;
  object-fit: contain;
  border-radius: var(--r-xl);
  filter: drop-shadow(0 0 30px rgba(0,229,255,0.3));
}

/* RTL: images flip to the left side */
[dir="rtl"] .how-header-row,
[dir="rtl"] .how-content-row {
  flex-direction: row-reverse;
}

/* ── TECH STACK SECTION ────────────────────────────────────── */
#tech-stack {
  background: var(--bg-surface);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.tech-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  text-align: center;
  transition: all var(--t-sm);
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.tech-card:hover::before { transform: scaleX(1); }

.tech-card:hover {
  background: var(--bg-hover);
  border-color: var(--teal-border);
  transform: translateY(-4px);
}

.tech-icon {
  font-size: 2.2rem;
  display: block;
  margin: 0 auto;
}

.tech-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.tech-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── DOWNLOAD SECTION ──────────────────────────────────────── */
#download {
  background: var(--bg-base);
  text-align: center;
}

.download-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.download-box::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.download-box-glow {
  position: absolute;
  top: -50%; left: -20%;
  width: 140%;
  height: 100%;
  background: radial-gradient(ellipse, rgba(0,229,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.download-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.download-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.7;
}

.download-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.download-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.download-meta-item .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.btn-download-main {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 52px;
  background: linear-gradient(135deg, var(--teal), #00a0b4);
  border: none;
  border-radius: var(--r-xl);
  color: #040c12;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.35s ease;
  overflow: hidden;
}

.btn-download-main::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-download-main:hover::before { left: 100%; }

.btn-download-main:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 60px rgba(0,229,255,0.5), 0 20px 60px rgba(0,229,255,0.2);
}

.download-rings {
  position: absolute;
  inset: -20px;
  pointer-events: none;
}

.download-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--teal-border);
  border-radius: 50%;
  animation: expandRing 3s ease-out infinite;
}

.download-ring:nth-child(1) { width: 100px; height: 100px; animation-delay: 0s; }
.download-ring:nth-child(2) { width: 140px; height: 140px; animation-delay: 0.8s; }
.download-ring:nth-child(3) { width: 180px; height: 180px; animation-delay: 1.6s; }

/* ── MY TEAM SECTION ──────────────────────────────────────── */
#team {
  background: var(--bg-base);
  text-align: center;
}

.team-box {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.team-box::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}

.team-img-wrapper {
  width: 100%;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-mid);
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.12), 0 20px 60px rgba(0, 0, 0, 0.4);
  position: relative;
}

.team-img-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, transparent 60%, rgba(0, 229, 255, 0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

.team-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.team-img-wrapper:hover .team-img {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .team-box { padding: 10px 10px; }
}

/* ── FAQ SECTION ───────────────────────────────────────────── */
#faq {
  background: var(--bg-surface);
}

.faq-list {
  margin: 50px auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 800px;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: border-color var(--t-sm);
}

.faq-item.open {
  border-color: var(--teal-border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: background var(--t-xs);
  user-select: none;
  gap: 16px;
}

.faq-question:hover { background: var(--bg-hover); }

.faq-chevron {
  width: 24px; height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--teal-dim);
  border: 1px solid var(--teal-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 0.7rem;
  transition: transform var(--t-sm);
}

.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: var(--bg-card);
}

.faq-item.open .faq-answer { max-height: 300px; }

.faq-answer-inner {
  padding: 0 24px 20px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.75;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

/* ── SCROLL REVEAL ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.8); }
}

@keyframes glowRing {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.6); }
}

@keyframes borderFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes shimmer {
  0%   { right: -40px; }
  100% { right: 100%; }
}

@keyframes scanLine {
  0%   { left: -60%; }
  100% { left: 160%; }
}

@keyframes expandRing {
  0%   { opacity: 0.5; transform: translate(-50%, -50%) scale(0.5); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ── PERFORMANCE: header row with side image ──────────────── */
.perf-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.perf-header-row .reveal {
  flex: 1;
  min-width: 0;
}

.perf-img-solo {
  display: none; /* shown only on large screens — see @media (min-width: 1024px) */
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perf-img-solo img {
  width: 310px;
  height: 300px;
  /* object-fit: contain; */
  border-radius: var(--r-xl);
  filter: drop-shadow(0 0 24px rgba(0, 229, 255, 0.25));
}

/* ── HOW IT WORKS: main layout wrapper ─────────────────────── */
.how-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  justify-content: space-between;
}

.how-text-col {
  flex: 1;
  min-width: 0;
}

/* ── ARABIC / RTL ──────────────────────────────────────────── */
[dir="rtl"] {
  font-family: var(--font-arabic), var(--font-body);
}
[dir="rtl"] .nav-links        { flex-direction: row-reverse; }
[dir="rtl"] .hero-content { direction: rtl; }
[dir="rtl"] .steps-container::before { left: auto; right: 30px; }
[dir="rtl"] .step-item { direction: rtl; }
[dir="rtl"] .section-desc { direction: rtl; }

/* ── About dialog: always centered regardless of language ── */
[dir="rtl"] dialog,
[dir="rtl"] dialog[open] {
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  inset-inline-start: unset;
}
/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .perf-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

@media (max-width: 768px) {
  .section-inner { padding: 70px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 24px; }
  .download-box { padding: 40px 24px; }
  .steps-container::before { display: none; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .how-header-row,
  .how-content-row { flex-direction: column; }
  .how-img-solo img { width: 180px; }
  .how-img-main img { width: 220px; }
  .nav-download-btn .btn-label { display: none; }
  .nav-download-btn { padding: 8px 12px; min-width: 36px; justify-content: center; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn-download-hero, .btn-outline { width: 100%; justify-content: center; }
  .tech-grid { grid-template-columns: 1fr; }
  .how-img-solo img { width: 140px; }
  .how-img-main img { width: 160px; }
}

/* ── LARGE SCREEN ONLY: reveal layout images ──────────────── */
@media (min-width: 1024px) {
  .perf-img-solo {
    display: flex;
  }
  .how-img-main {
    display: flex;
  }
}

/* Mobile nav menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
}

.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--t-xs);
}
.nav-mobile-menu a:hover { color: var(--teal); }
/* ── SITE FOOTER ────────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.footer-left {
  display: flex; align-items: center; gap: var(--sp-3);
}
.footer-brand {
  font-family: "RubikDoodle";
  font-weight: 700; font-size: 0.95rem;
  color: var(--text-primary);
}
.footer-brand span { color: var(--teal); }
.footer-copy {
  font-size: 0.78rem; color: var(--text-muted);
  font-family: "LibreBaskerville", Georgia, serif;
  font-weight: bold;
}
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--sp-6);
  width: 100%;
}
/* ── SOCIAL LINKS (footer) ──────────────────────────────────── */
.social-links {
  display: flex; align-items: center; gap: var(--sp-2);
}
.social-link {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--t-xs);
}

.footer-icon-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: var(--r-sm);
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
  color: inherit;
}

.footer-icon-btn:hover {
  background: var(--teal-dim);
  opacity: 0.8;
}

.footer-icon-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.dialog-header {
  display: flex; flex-direction: column; align-items: center;
  padding: var(--sp-5) var(--sp-4) var(--sp-4); /* mobile — expanded at 481px */
  text-align: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border-subtle);
}

/* ── DIALOG RESPONSIVE — rebuilt as Mobile First at end of file ── */

dialog::backdrop {
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
}


.dialog-logo {
  width: 72px; height: 72px;
  background: var(--teal-dim);
  border: 2px solid var(--teal-border);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem;
  box-shadow: var(--shadow-teal);
}

.dialog-version {
  font-family: var(--font-mono);
  font-size: 0.8rem; color: var(--text-muted);
}

.dialog-body {
  padding: var(--sp-4) var(--sp-4); /* mobile — expanded at 481px */
  font-size: 0.9rem; line-height: 1.75;
  color: var(--text-secondary);
}

.dialog-body h3 {
  font-size: 0.88rem; color: var(--teal);
  margin-bottom: var(--sp-2); margin-top: var(--sp-5);
  font-family: var(--font-mono);
  text-transform: uppercase; letter-spacing: 0.05em;
}

.dialog-body ul {
  padding-left: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-1);
}

.dialog-body li { color: var(--text-secondary); font-size: 0.88rem; }

.dialog-update {
  margin: 0 var(--sp-8);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  display: none;
}
.dialog-update.show   { display: block; }
.dialog-update.ok     { background: rgba(0,189,189,0.10); color: var(--teal); border: 1px solid var(--teal-border); }
.dialog-update.new    { background: rgba(230,126,34,0.10); color: var(--orange); border: 1px solid rgba(230,126,34,0.3); }
.dialog-update.error  { background: rgba(231,76,60,0.10); color: var(--red); border: 1px solid rgba(231,76,60,0.3); }

.dialog-footer {
  padding: var(--sp-3) var(--sp-4) var(--sp-5); /* mobile — expanded at 481px */
  display: flex; justify-content: center; gap: var(--sp-2);
  flex-wrap: wrap;
}

dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-2xl);
  color: var(--text-primary);
  max-width: 480px;
  width: 90%;
  padding: 0;
  /* ✅ Force centering on all screen sizes */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.btn { padding: 8px 20px; border-radius: var(--r-md); border: none; cursor: pointer; font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; transition: all var(--t-xs); }
.btn-red { background: rgba(231,76,60,0.15); border: 1px solid rgba(231,76,60,0.3); color: var(--red); }
.btn-red:hover { background: rgba(231,76,60,0.25); }
.logo-icon img { width: 60px; height: 60px; border-radius: var(--r-lg); object-fit: cover; }
