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

:root {
  --bg: #050810;
  --bg-2: #080d1a;
  --bg-card: rgba(12, 18, 35, 0.8);
  --primary: #6c63ff;
  --primary-glow: rgba(108, 99, 255, 0.4);
  --accent: #00d4ff;
  --accent-2: #ff6b9d;
  --text: #e8eaf0;
  --text-muted: #7c849b;
  --text-dim: #4a5270;
  --border: rgba(108, 99, 255, 0.2);
  --border-light: rgba(255,255,255,0.07);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Canvas behind everything */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

main { position: relative; z-index: 1; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================================
   NAV
================================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.4s ease;
}

#navbar.scrolled {
  background: rgba(5, 8, 16, 0.9);
  backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-bracket {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(5, 8, 16, 0.98);
  backdrop-filter: blur(20px);
  z-index: 99;
  justify-content: center;
  align-items: center;
}

.mobile-menu.open { display: flex; }

.mobile-menu ul {
  list-style: none;
  text-align: center;
}

.mobile-menu li { margin: 24px 0; }

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 700;
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--primary); }

/* ================================================
   HERO
================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 32px;
  width: fit-content;
  animation: fadeDown 0.8s ease;
}

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

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

.hero-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
  animation: fadeUp 1s ease 0.2s both;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
  animation: fadeUp 1s ease 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 30px var(--primary-glow);
}

.btn-primary:hover {
  background: #7c75ff;
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(108,99,255,0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-ghost:hover {
  background: var(--border-light);
  border-color: var(--border);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: fadeUp 1s ease 0.4s both;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
}

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

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  animation: fadeUp 1s ease 0.6s both;
}

.scroll-indicator {
  width: 24px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding: 4px;
}

.scroll-dot {
  width: 4px; height: 8px;
  background: var(--primary);
  border-radius: 4px;
  animation: scrollAnim 2s ease infinite;
}

@keyframes scrollAnim {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* ================================================
   SECTION COMMON
================================================ */
section {
  padding: 120px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 72px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--primary);
  display: block;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.section-header h2, .about-text h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 480px;
  margin: 0 auto;
}

/* ================================================
   ABOUT
================================================ */
#about {
  background: var(--bg-2);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.05rem;
  line-height: 1.75;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.tech-stack span {
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  color: var(--primary);
}

.about-visual {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.fc-icon { font-size: 1.4rem; }

.card-1 { top: 20%; left: 0; animation: float1 4s ease-in-out infinite; }
.card-2 { top: 50%; right: 0; animation: float2 4s ease-in-out 1s infinite; }
.card-3 { bottom: 15%; left: 20%; animation: float1 4s ease-in-out 0.5s infinite; }

.orbit-ring {
  width: 300px; height: 300px;
  border: 1px solid var(--border);
  border-radius: 50%;
  animation: spin 20s linear infinite;
  position: absolute;
}

.orbit-ring::before {
  content: '';
  position: absolute;
  top: -6px; left: 50%;
  width: 12px; height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 16px var(--primary);
  transform: translateX(-50%);
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

/* ================================================
   PROJECTS
================================================ */
#projects { background: var(--bg); }

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

.project-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  overflow: hidden;
  cursor: default;
}

.project-card.featured {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.08) 0%, rgba(0, 212, 255, 0.05) 100%);
  border-color: var(--border);
}

.card-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 40px var(--primary-glow);
}

.project-card:hover .card-glow { opacity: 1; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(108, 99, 255, 0.12);
  border: 1px solid rgba(108, 99, 255, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
}

.project-links { display: flex; gap: 12px; }

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--border-light);
  color: var(--text-muted);
  transition: all 0.2s;
  text-decoration: none;
}

.icon-link svg { width: 16px; height: 16px; }
.icon-link:hover { background: var(--primary); color: #fff; }

.project-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.project-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feature-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-stack span {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* ================================================
   UPCOMING
================================================ */
#upcoming { background: var(--bg-2); }

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

.upcoming-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
}

.upcoming-card:hover {
  transform: translateY(-4px);
  border-color: var(--border);
}

.upcoming-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

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

.pulse-dot.orange {
  background: #fb923c;
  box-shadow: 0 0 8px #fb923c;
}

.upcoming-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.upcoming-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.upcoming-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 24px;
}

.upcoming-progress {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  width: var(--progress);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
}

.upcoming-progress span {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  font-family: var(--font-mono);
}

/* ================================================
   DZ GUIDE
================================================ */
#dz-guide { background: var(--bg); }

.guide-grid {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.guide-section {}

.guide-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.guide-icon { font-size: 2rem; }

.guide-header h3 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.guide-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
}

.guide-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.service-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.fatourati { background: linear-gradient(135deg, #6c63ff, #00d4ff); color: #fff; }
.edahabia { background: linear-gradient(135deg, #16a34a, #4ade80); color: #fff; }
.cib { background: linear-gradient(135deg, #dc2626, #f87171); color: #fff; font-size: 0.7rem; }
.dawla { background: linear-gradient(135deg, #d97706, #fbbf24); color: #fff; }
.passport { background: linear-gradient(135deg, #0284c7, #38bdf8); color: #fff; }
.fisc { background: linear-gradient(135deg, #7c3aed, #a78bfa); color: #fff; }

.service-info h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.service-badge {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.guide-card > p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.service-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.service-features li {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.guide-tip {
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tip-label {
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 4px;
}

/* Ecosystem list */
.ecosystem-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.ecosystem-item {
  display: flex;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.ecosystem-item:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.eco-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eco-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.eco-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ================================================
   CONTACT
================================================ */
#contact {
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  bottom: -200px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.contact-left h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.contact-left p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.contact-link svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
}

.contact-link:hover { color: var(--text); }

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(20px);
}

.contact-card-header {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-card-sub {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.contact-divider {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 16px 0;
  position: relative;
}

.contact-divider::before, .contact-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: var(--border-light);
}

.contact-divider::before { left: 0; }
.contact-divider::after { right: 0; }

/* ================================================
   FOOTER
================================================ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  padding: 48px 0;
}

.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

footer p {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-copy {
  font-size: 0.78rem !important;
}

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

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

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

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

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 1024px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card.featured { grid-column: span 2; }
  .upcoming-grid { grid-template-columns: 1fr 1fr; }
  .guide-cards { grid-template-columns: 1fr 1fr; }
  .about-grid { gap: 48px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  #hero { padding: 100px 24px 60px; }

  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-visual {
    height: 280px;
    order: -1;
  }

  .orbit-ring { width: 220px; height: 220px; }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured { grid-column: span 1; }

  .upcoming-grid { grid-template-columns: 1fr; }

  .guide-cards { grid-template-columns: 1fr; }

  .ecosystem-list { grid-template-columns: 1fr; }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  section { padding: 80px 0; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .floating-card { font-size: 0.8rem; padding: 12px 16px; }
  .card-2 { right: -10px; }
}

/* ================================================
   SCROLLBAR
================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}
