/* ===== AQ Developer Landing Page - Design System ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ===== CSS Custom Properties (Dark/Light Themes) ===== */
:root {
  --font-ar: 'Tajawal', sans-serif;
  --font-en: 'Inter', sans-serif;
  --transition-speed: 0.4s;
  --border-radius: 16px;
  --border-radius-sm: 10px;
  --border-radius-xs: 6px;
  --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.3);
  --glow-purple: 0 0 30px rgba(124, 58, 237, 0.3);
}

[data-theme="dark"] {
  --bg-primary: #06080f;
  --bg-secondary: #0d1117;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(13, 17, 23, 0.7);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-1: #00d4ff;
  --accent-2: #7c3aed;
  --accent-3: #06d6a0;
  --gradient-main: linear-gradient(135deg, #00d4ff, #7c3aed);
  --gradient-card: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(124,58,237,0.08));
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(0, 212, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(6, 8, 15, 0.85);
  --hero-overlay: linear-gradient(180deg, rgba(6,8,15,0.3) 0%, rgba(6,8,15,0.95) 100%);
  --trust-bg: rgba(0,212,255,0.03);
  --faq-bg: rgba(255,255,255,0.02);
  --footer-bg: #030508;
  --toggle-bg: rgba(255,255,255,0.08);
  --toggle-icon: '🌙';
}

[data-theme="light"] {
  --bg-primary: #f8fafd;
  --bg-secondary: #ffffff;
  --bg-card: rgba(0, 0, 0, 0.02);
  --bg-card-hover: rgba(0, 0, 0, 0.05);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent-1: #0066ff;
  --accent-2: #7c3aed;
  --accent-3: #059669;
  --gradient-main: linear-gradient(135deg, #0066ff, #7c3aed);
  --gradient-card: linear-gradient(135deg, rgba(0,102,255,0.05), rgba(124,58,237,0.05));
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(0, 102, 255, 0.12);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.1);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --hero-overlay: linear-gradient(180deg, rgba(248,250,253,0.2) 0%, rgba(248,250,253,0.95) 100%);
  --trust-bg: rgba(0,102,255,0.03);
  --faq-bg: rgba(0,0,0,0.02);
  --footer-bg: #0f172a;
  --toggle-bg: rgba(0,0,0,0.06);
  --toggle-icon: '☀️';
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-ar);
  background: var(--bg-primary);
  color: var(--text-primary);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--transition-speed), color var(--transition-speed);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.en { font-family: var(--font-en); direction: ltr; display: inline-block; }

/* ===== Utility ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-padding { padding: 100px 0; }
.gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.4rem; font-weight: 800; margin-bottom: 12px; }
.section-header p { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ===== Navigation ===== */
.navbar {
  position: fixed; top: 0; right: 0; left: 0; z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-speed);
  padding: 0 24px;
}
.navbar.scrolled { box-shadow: var(--shadow-card); }
.nav-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo svg { width: 40px; height: 40px; }
.nav-logo span { font-size: 1.3rem; font-weight: 800; }
.nav-logo .en { font-size: 1.1rem; font-weight: 700; }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); transition: color 0.3s; position: relative; }
.nav-links a:hover { color: var(--accent-1); }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; right: 0; width: 0; height: 2px; background: var(--gradient-main); transition: width 0.3s; }
.nav-links a:hover::after { width: 100%; }

.theme-toggle {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--toggle-bg); border: 1px solid var(--border-color);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; transition: all 0.3s;
}
.theme-toggle:hover { border-color: var(--accent-1); box-shadow: var(--glow-cyan); }

.nav-cta {
  background: var(--gradient-main); color: #fff; padding: 10px 24px;
  border-radius: var(--border-radius-xs); font-weight: 600; font-size: 0.9rem;
  border: none; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: var(--glow-cyan); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text-primary); border-radius: 2px; transition: all 0.3s; }

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding-top: 72px;
}
#particles-canvas {
  position: absolute; inset: 0; z-index: 0;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3; z-index: 0;
}
.hero-glow {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  filter: blur(120px); opacity: 0.15; z-index: 0;
}
.hero-glow-1 { background: var(--accent-1); top: -200px; left: -100px; }
.hero-glow-2 { background: var(--accent-2); bottom: -200px; right: -100px; }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 60px 0; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-card); border: 1px solid var(--border-glow);
  padding: 8px 20px; border-radius: 50px; font-size: 0.85rem;
  color: var(--accent-1); margin-bottom: 28px; backdrop-filter: blur(10px);
}
.hero-badge .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; line-height: 1.3; margin-bottom: 20px; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero h1 .highlight { position: relative; }
.hero h1 .highlight::after {
  content: ''; position: absolute; bottom: 4px; right: 0; left: 0; height: 12px;
  background: var(--gradient-main); opacity: 0.25; border-radius: 4px; z-index: -1;
}
.hero-sub { font-size: 1.2rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 40px; line-height: 1.8; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gradient-main); color: #fff; padding: 16px 36px;
  border-radius: var(--border-radius-sm); font-weight: 700; font-size: 1.05rem;
  border: none; cursor: pointer; transition: all 0.3s; font-family: var(--font-ar);
  box-shadow: 0 4px 20px rgba(0,212,255,0.25);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,212,255,0.4); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg-card); color: var(--text-primary); padding: 16px 36px;
  border-radius: var(--border-radius-sm); font-weight: 600; font-size: 1.05rem;
  border: 1px solid var(--border-color); cursor: pointer; transition: all 0.3s; font-family: var(--font-ar);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover { border-color: var(--accent-1); transform: translateY(-3px); box-shadow: var(--glow-cyan); }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 60px; flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat .stat-number { font-family: var(--font-en); font-size: 2.2rem; font-weight: 800; }
.hero-stat .stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ===== Trust Bar ===== */
.trust-bar {
  background: var(--trust-bg); border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color); padding: 24px 0;
}
.trust-inner { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.trust-item .flag { font-size: 1.5rem; }
.trust-label { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

/* ===== Why AQ Section ===== */
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.why-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); padding: 36px 28px;
  transition: all 0.4s; position: relative; overflow: hidden;
}
.why-card::before {
  content: ''; position: absolute; inset: 0;
  background: var(--gradient-card); opacity: 0; transition: opacity 0.4s;
}
.why-card:hover { transform: translateY(-8px) perspective(600px) rotateX(2deg); border-color: var(--border-glow); box-shadow: var(--shadow-elevated); }
.why-card:hover::before { opacity: 1; }
.why-card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--gradient-main); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; position: relative; z-index: 1;
  box-shadow: 0 4px 16px rgba(0,212,255,0.2);
}
.why-card-icon svg { width: 28px; height: 28px; fill: #fff; }
.why-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; position: relative; z-index: 1; }
.why-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; position: relative; z-index: 1; }

/* ===== Services Grid ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.service-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); padding: 32px 24px;
  text-align: center; transition: all 0.4s; cursor: pointer;
  position: relative; overflow: hidden;
}
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-main); transform: scaleX(0); transition: transform 0.4s;
}
.service-card:hover { transform: translateY(-6px); border-color: var(--border-glow); box-shadow: var(--shadow-elevated); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 20px;
  background: var(--gradient-card); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.4s;
}
.service-card:hover .service-icon { transform: scale(1.1) rotateY(10deg); box-shadow: var(--glow-cyan); }
.service-icon svg { width: 36px; height: 36px; }
.service-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.service-card p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; }
.service-tag { display: inline-block; font-size: 0.75rem; font-family: var(--font-en); color: var(--accent-1); background: rgba(0,212,255,0.08); padding: 4px 12px; border-radius: 20px; margin-top: 12px; }

/* ===== Portfolio Section ===== */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 32px; }
.portfolio-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--border-radius); overflow: hidden;
  transition: all 0.4s; position: relative;
}
.portfolio-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-elevated); border-color: var(--border-glow); }
.portfolio-visual {
  height: 220px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.portfolio-visual svg { width: 100%; height: 100%; }
.portfolio-info { padding: 28px; }
.portfolio-info .product-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--accent-1); background: rgba(0,212,255,0.08); padding: 4px 14px; border-radius: 20px; margin-bottom: 12px; }
.portfolio-info h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.portfolio-info p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; margin-bottom: 16px; }
.portfolio-features { display: flex; flex-wrap: wrap; gap: 8px; }
.portfolio-features span {
  font-size: 0.78rem; padding: 5px 12px; border-radius: 6px;
  background: var(--bg-card-hover); color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ===== Process / How We Work ===== */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.process-steps::before {
  content: ''; position: absolute; top: 44px;
  right: calc(12.5% + 28px); left: calc(12.5% + 28px);
  height: 2px; background: var(--gradient-main); opacity: 0.3;
}
.process-step { text-align: center; position: relative; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 20px;
  background: var(--gradient-main); color: #fff; font-family: var(--font-en);
  font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2; box-shadow: 0 4px 20px rgba(0,212,255,0.25);
}
.process-step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.process-step p { color: var(--text-secondary); font-size: 0.88rem; }

/* ===== Tech Tip ===== */
.tip-section {
  background: var(--gradient-card); border: 1px solid var(--border-glow);
  border-radius: var(--border-radius); padding: 48px;
  position: relative; overflow: hidden;
}
.tip-section::before {
  content: '💡'; position: absolute; top: -20px; left: -20px;
  font-size: 120px; opacity: 0.04;
}
.tip-section h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 16px; }
.tip-section p { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.9; max-width: 800px; }
.tip-highlight { color: var(--accent-1); font-weight: 700; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--faq-bg); border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); overflow: hidden; transition: all 0.3s; }
.faq-item.active { border-color: var(--border-glow); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; cursor: pointer; font-weight: 600; font-size: 1.05rem;
  transition: color 0.3s; gap: 16px;
}
.faq-question:hover { color: var(--accent-1); }
.faq-icon { width: 28px; height: 28px; flex-shrink: 0; transition: transform 0.3s; color: var(--accent-1); }
.faq-item.active .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-answer-inner { padding: 0 24px 20px; color: var(--text-secondary); line-height: 1.8; font-size: 0.95rem; }

/* ===== Footer ===== */
.footer { background: var(--footer-bg); color: #f0f6fc; padding: 80px 0 0; }
.footer-cta { text-align: center; padding-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; color: #fff; }
.footer-cta p { color: #8b949e; margin-bottom: 28px; font-size: 1.05rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; padding: 48px 0; }
.footer-col h4 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: #fff; }
.footer-col a, .footer-col p { color: #8b949e; font-size: 0.9rem; display: block; margin-bottom: 10px; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-1); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 20px 0; text-align: center; color: #6e7681; font-size: 0.85rem; }

/* ===== Stats Chart SVG ===== */
.stats-chart { max-width: 100%; margin: 40px auto 0; }
.chart-bar { transition: all 0.6s ease; }
.chart-bar:hover { filter: brightness(1.3); }

/* ===== Animations ===== */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 72px; right: 0; left: 0; background: var(--nav-bg); backdrop-filter: blur(20px); flex-direction: column; padding: 24px; gap: 20px; border-bottom: 1px solid var(--border-color); }
  .nav-links.active { display: flex; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 1.9rem; }
  .hero-sub { font-size: 1rem; }
  .hero-stats { gap: 24px; }
  .hero-stat .stat-number { font-size: 1.6rem; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .process-steps::before { display: none; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .tip-section { padding: 28px; }
  .section-header h2 { font-size: 1.8rem; }
  .trust-inner { gap: 20px; }
  .footer-cta h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
