/* ===== المتغيرات ===== */
:root {
  --bg: #09090b;
  --bg-alt: #0f0f12;
  --surface: #131316;
  --surface-2: #18181b;
  --border: #26262a;
  --border-light: #2e2e33;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;
  --accent: #3b82f6;
  --accent-2: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --font: 'Tajawal', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Tajawal', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== التهيئة ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 100px 0; }

/* ===== الأزرار ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  white-space: nowrap;
  font-size: 15px;
}

.btn--primary {
  background: var(--text);
  color: var(--bg);
  padding: 12px 24px;
}
.btn--primary:hover {
  background: #e4e4e7;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.1);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
  padding: 12px 24px;
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--text-dim);
}

.btn--sm { padding: 8px 18px; font-size: 14px; }
.btn--lg { padding: 14px 32px; font-size: 16px; }
.btn--block { width: 100%; }

/* ===== شريط التنقل ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

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

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  font-family: var(--font);
}

.logo-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--accent);
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface); }

.nav-cta { margin-inline-start: 8px; }

.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.navbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== قسم البطل ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 40%, transparent 100%);
}

.hero__glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-family: var(--font);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.9;
}

.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero__trust {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dim);
}

.trust-avatars { display: flex; }

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  margin-inline-start: -8px;
  background: linear-gradient(135deg, hsl(calc(200 + var(--i) * 30), 60%, 50%), hsl(calc(260 + var(--i) * 20), 60%, 40%));
}

.avatar:first-child { margin-inline-start: 0; }

/* ===== شريط العملاء ===== */
.logos {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.logos__label {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.logos__track {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.logo-item {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  opacity: 0.7;
  transition: opacity var(--transition);
}
.logo-item:hover { opacity: 1; color: var(--text-muted); }

/* ===== رأس الأقسام ===== */
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 60px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ===== الميزات ===== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}
.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ===== المشاريع ===== */
.projects { background: var(--bg-alt); }

.projects__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.project-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.project-card__img {
  height: 200px;
  position: relative;
}
.project-card--lg .project-card__img { height: 260px; }

.project-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.project-card__badge--done {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.project-card__body { padding: 22px; }

.project-card__type {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.project-card__body h3 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 6px 0 8px;
}

.project-card__body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 14px;
}

.project-card__meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== الإحصائيات ===== */
.stats { padding: 80px 0; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  text-align: center;
  padding: 32px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.stat-item:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.stat-number {
  display: block;
  font-family: var(--font);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-number::after { content: '+'; color: var(--accent); }

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ===== آراء العملاء ===== */
.testimonials { background: var(--bg-alt); }

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

.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
}
.testimonial-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.testimonial-card__stars {
  color: #f59e0b;
  font-size: 15px;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.testimonial-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.9;
  margin-bottom: 22px;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.testimonial-card__author strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.testimonial-card__author span {
  font-size: 12px;
  color: var(--text-dim);
}

/* ===== الأسئلة الشائعة ===== */
.faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: var(--border-light); }

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  gap: 16px;
}

.faq-icon {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform var(--transition);
}
.faq-item.open .faq-icon { transform: rotate(180deg); color: var(--accent); }

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}
.faq-item.open .faq-item__a {
  max-height: 300px;
  padding: 0 24px 20px;
}

.faq-item__a p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

/* ===== CTA ===== */
.cta { padding: 100px 0; }

.cta__card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 60px 48px;
  text-align: center;
  overflow: hidden;
}

.cta__glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.cta__title {
  position: relative;
  font-family: var(--font);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.cta__subtitle {
  position: relative;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.cta__form {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cta__form input,
.cta__form select,
.cta__form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition);
  outline: none;
}

.cta__form input::placeholder,
.cta__form textarea::placeholder { color: var(--text-dim); }

.cta__form input:focus,
.cta__form select:focus,
.cta__form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.cta__form select { appearance: none; cursor: pointer; }
.cta__form select option { background: var(--surface); }

.cta__note {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ===== التذييل ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  background: var(--bg-alt);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer__brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-top: 16px;
  max-width: 280px;
}

.footer__col h4 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.footer__col a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  padding: 5px 0;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.footer__bottom p {
  font-size: 13px;
  color: var(--text-dim);
}

.footer__social {
  display: flex;
  gap: 10px;
}

.footer__social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}
.footer__social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===== الحركات ===== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== الاستجابة ===== */
@media (max-width: 1024px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .projects__grid { grid-template-columns: 1fr 1fr; }
  .projects__grid .project-card--lg { grid-column: 1 / -1; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 72px 0; }

  .navbar__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 80px 24px 40px;
    gap: 4px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }
  .navbar__nav.open { right: 0; }

  .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius);
  }

  .nav-cta { margin: 16px 0 0; text-align: center; justify-content: center; }

  .navbar__toggle { display: flex; z-index: 1001; }

  .navbar__toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .navbar__toggle.open span:nth-child(2) { opacity: 0; }
  .navbar__toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero { min-height: auto; padding: 120px 0 60px; }

  .features__grid { grid-template-columns: 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr; }

  .cta__card { padding: 40px 24px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .stats__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  }
