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

:root {
  --bg-main: #0A0A0B;
  --bg-card: rgba(13,12,19,0.6);
  --bg-footer: #060607;
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --pink-500: #ec4899;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --white: #ffffff;
  --border-subtle: rgba(255,255,255,0.05);
  --border-purple: rgba(111,40,221,0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background-color: var(--bg-main);
  color: var(--white);
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: #7c3aed; color: #fff; }

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 640px) { .container { padding-left: 2rem; padding-right: 2rem; } }
@media (min-width: 1024px) { .container { padding-left: 3rem; padding-right: 3rem; } }

/* ===== GLASS & GLOW ===== */
.glass-card {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(13,12,19,0.6);
  border: 1px solid var(--border-purple);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.glass-card-hover {
  transition: all 0.3s cubic-bezier(0.23,1,0.32,1);
}
.glass-card-hover:hover {
  background: rgba(17,16,26,0.8);
  border-color: rgba(111,40,221,0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(111,40,221,0.15);
}
.glow-purple { box-shadow: 0 0 30px rgba(111,40,221,0.25); }
.text-glow { text-shadow: 0 0 15px rgba(139,92,246,0.4); }

.gradient-text {
  background: linear-gradient(to left, #a78bfa, #8b5cf6, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SECTION BADGE ===== */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 1rem;
  border-radius: 9999px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: var(--purple-400);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-20px)} to{opacity:1;transform:translateY(0)} }
@keyframes spin { to{transform:rotate(360deg)} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes shimmer { 0%{background-position:-200% center} 100%{background-position:200% center} }
@keyframes glow-pulse { 0%,100%{box-shadow:0 0 30px rgba(111,40,221,.25)} 50%{box-shadow:0 0 50px rgba(111,40,221,.5)} }

.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  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; }

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  background: rgba(10,10,11,0.88);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.875rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-link img {
  height: 2.75rem;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s;
}
.logo-link:hover img { transform: scale(1.05); }

nav.desktop-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
}
@media (min-width: 768px) { nav.desktop-nav { display: flex; } }
nav.desktop-nav a {
  text-decoration: none;
  color: var(--gray-400);
  transition: color 0.2s;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
nav.desktop-nav a:hover { color: var(--white); }
nav.desktop-nav a.active {
  color: var(--purple-400);
  border-bottom-color: var(--purple-400);
}

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.btn-nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--purple-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, box-shadow 0.3s;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.btn-nav-cta:hover { background: var(--purple-500); box-shadow: 0 0 30px rgba(124,58,237,0.5); }

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.1); }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  text-decoration: none;
  color: var(--gray-400);
  padding: 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a.active { color: var(--purple-400); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--purple-600);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  box-shadow: 0 0 25px rgba(124,58,237,0.3);
}
.btn-primary:hover { background: var(--purple-500); transform: translateY(-2px); box-shadow: 0 0 40px rgba(124,58,237,0.5); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--purple-600);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}
.btn-secondary:hover { background: var(--purple-700); }

/* ===== PAGE HERO (for inner pages) ===== */
.page-hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 0%, rgba(124,58,237,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 0% 100%, rgba(236,72,153,0.08) 0%, transparent 50%);
}
.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}
.page-hero-content h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin: 1rem 0;
}
.page-hero-content p {
  font-size: 1.125rem;
  color: var(--gray-300);
  line-height: 1.8;
  margin-top: 1rem;
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 4rem;
}
.section-header h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 900;
  margin: 0.75rem 0;
  line-height: 1.2;
}
.section-header p {
  font-size: 1.0625rem;
  color: var(--gray-400);
  line-height: 1.75;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2rem;
  color: var(--gray-400);
  font-size: 0.875rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  text-align: right;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand img { height: 3rem; width: auto; object-fit: contain; margin-bottom: 1.25rem; display: block; }
.footer-brand p { color: var(--gray-400); line-height: 1.7; max-width: 28rem; }
.footer-col h4 { font-weight: 700; color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: var(--gray-400); text-decoration: none; transition: color 0.2s; font-size: 0.875rem; }
.footer-col ul li a:hover { color: var(--purple-400); }
.footer-col.services-col ul li a { font-size: 0.8125rem; }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-align: center;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; text-align: right; } }
.footer-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--purple-500);
  margin-left: 0.4rem;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120px);
  background: #1a1a2e;
  border: 1px solid rgba(139,92,246,0.3);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  text-align: center;
  min-width: 280px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error { border-color: rgba(239,68,68,0.4); }

/* ===== FORM ELEMENTS ===== */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.25rem; }
.form-group label { font-size: 0.875rem; color: var(--gray-400); font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: #fff;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--gray-500); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--purple-500); background: rgba(255,255,255,0.07); }
.form-group textarea { resize: none; }

svg { display: inline-block; vertical-align: middle; }
