/* ============================================================
   MCLANTIS Group Engineering — Tech/Sci-Fi Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-0: #03060F;
  --bg-1: #070C1A;
  --bg-2: #0D1425;
  --bg-card: rgba(13, 20, 37, 0.55);
  --bg-card-hover: rgba(20, 30, 55, 0.7);
  --neon-cyan: #22D3EE;
  --neon-blue: #3B82F6;
  --neon-orange: #F97316;
  --neon-green: #34D399;
  --neon-purple: #A78BFA;
  --neon-gold: #C9A96E;
  --text-0: #F1F5F9;
  --text-1: #CBD5E1;
  --text-2: #94A3B8;
  --text-3: #64748B;
  --border-dim: rgba(34, 211, 238, 0.08);
  --border-mid: rgba(34, 211, 238, 0.18);
  --border-bright: rgba(34, 211, 238, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Animated grid background ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

/* ---- Floating orbs ---- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}
.orb-1 { width: 500px; height: 500px; background: var(--neon-cyan); top: -10%; right: -5%; animation: orbFloat1 15s ease-in-out infinite; }
.orb-2 { width: 400px; height: 400px; background: var(--neon-blue); bottom: -10%; left: -5%; animation: orbFloat2 18s ease-in-out infinite; }
.orb-3 { width: 300px; height: 300px; background: var(--neon-orange); top: 40%; left: 50%; animation: orbFloat3 22s ease-in-out infinite; }
@keyframes orbFloat1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-60px, 40px); } }
@keyframes orbFloat2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(50px, -30px); } }
@keyframes orbFloat3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px, -50px) scale(1.1); } }

/* ---- Typography ---- */
.font-display { font-family: 'Space Grotesk', sans-serif; }
.font-mono { font-family: 'JetBrains Mono', monospace; }

h1, h2, h3, h4 { color: var(--text-0); font-family: 'Space Grotesk', sans-serif; }

/* ---- Glass card ---- */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.6), transparent);
  opacity: 0.6;
}
.glass:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.08), inset 0 1px 0 rgba(34, 211, 238, 0.1);
  transform: translateY(-3px);
}

/* ---- Corner brackets (HUD style) ---- */
.hud-brackets { position: relative; }
.hud-brackets::before, .hud-brackets::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--neon-cyan);
  border-style: solid;
  opacity: 0.7;
  transition: opacity 0.3s;
}
.hud-brackets::before { top: 6px; left: 6px; border-width: 2px 0 0 2px; }
.hud-brackets::after { bottom: 6px; right: 6px; border-width: 0 2px 2px 0; }
.hud-brackets:hover::before, .hud-brackets:hover::after { opacity: 1; }

/* ---- Neon button ---- */
.btn-neon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.08));
  border: 1px solid var(--border-bright);
  color: var(--neon-cyan);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.btn-neon::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.2), transparent);
  transition: left 0.5s;
}
.btn-neon:hover {
  background: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 25px rgba(34, 211, 238, 0.25);
  border-color: var(--neon-cyan);
  color: #fff;
}
.btn-neon:hover::after { left: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-orange), #EA580C);
  border: 1px solid var(--neon-orange);
  color: #000;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #FB923C, var(--neon-orange));
  box-shadow: 0 0 25px rgba(249, 115, 22, 0.35);
  color: #000;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text-1);
}
.btn-ghost:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  background: rgba(34, 211, 238, 0.05);
  box-shadow: none;
}

/* ---- Glow text ---- */
.glow-cyan { color: var(--neon-cyan); text-shadow: 0 0 20px rgba(34, 211, 238, 0.4); }
.glow-orange { color: var(--neon-orange); text-shadow: 0 0 20px rgba(249, 115, 22, 0.4); }
.gradient-text {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue), var(--neon-cyan));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift { 0%,100% { background-position: 0% center; } 50% { background-position: 100% center; } }

/* ---- HUD label ---- */
.hud-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--neon-cyan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hud-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}

/* ---- Pulse dot ---- */
.pulse-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 10px var(--neon-green); }
  50% { opacity: 0.4; transform: scale(0.7); box-shadow: 0 0 4px var(--neon-green); }
}

/* ---- Scanline ---- */
.scanline { position: relative; overflow: hidden; }
.scanline::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  box-shadow: 0 0 8px var(--neon-cyan);
  animation: scanMove 4s linear infinite;
  opacity: 0.5;
}
@keyframes scanMove { 0% { top: 0; } 100% { top: 100%; } }

/* ---- Progress bar ---- */
.progress-track {
  height: 4px;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
  position: relative;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6));
  animation: shimmer 1.5s ease-in-out infinite;
}
@keyframes shimmer { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

/* ---- Stat number ---- */
.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* ---- Nav ---- */
.nav-glass {
  background: rgba(3, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dim);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
.nav-link {
  position: relative;
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
  padding: 4px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
  transition: width 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--neon-cyan); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%; left: 0;
  margin-top: 8px;
  min-width: 260px;
  background: rgba(7, 12, 26, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.3s;
  z-index: 200;
}
.nav-dropdown-wrap:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-dropdown a:hover {
  background: rgba(34, 211, 238, 0.08);
  color: var(--neon-cyan);
}
.nav-dropdown a .dd-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-3);
  margin-left: auto;
}

/* ---- Language switcher ---- */
.lang-switch {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  color: var(--text-1);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  transition: all 0.3s;
}
.lang-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); }
.lang-menu {
  position: absolute;
  top: 100%; right: 0;
  margin-top: 6px;
  background: rgba(7, 12, 26, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 6px;
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.25s;
  z-index: 300;
  max-height: 320px;
  overflow-y: auto;
}
.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu button,
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.lang-menu button:hover,
.lang-menu a:hover { background: rgba(34, 211, 238, 0.08); color: var(--neon-cyan); }
.lang-menu button.active,
.lang-menu a.active { color: var(--neon-cyan); background: rgba(34, 211, 238, 0.1); }
.lang-menu button .lang-code,
.lang-menu a .lang-code { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-3); margin-left: auto; }
[dir="rtl"] .lang-menu button,
[dir="rtl"] .lang-menu a { text-align: right; }

/* ---- Hero ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  overflow: hidden;
}
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ---- Section ---- */
.section {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}
.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--neon-cyan);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-tag::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan);
}

/* ---- Bento grid ---- */
.bento-grid {
  display: grid;
  gap: 20px;
}
.bento-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-mid);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.bento-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(34, 211, 238, 0.08);
}
.bento-card:hover::before { opacity: 1; }
.bento-card .bento-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(59, 130, 246, 0.08));
  border: 1px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--neon-cyan);
  margin-bottom: 20px;
}
.bento-card .bento-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.15em;
  position: absolute;
  top: 20px; right: 24px;
}

/* ---- Data table (tech style) ---- */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tech-table thead th {
  background: rgba(34, 211, 238, 0.06);
  color: var(--neon-cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-mid);
}
.tech-table tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-dim);
  color: var(--text-1);
}
.tech-table tbody tr {
  transition: background 0.2s;
}
.tech-table tbody tr:hover {
  background: rgba(34, 211, 238, 0.03);
}
.tech-table tbody tr:last-child td { border-bottom: none; }
.tech-table .spec-val {
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-cyan);
  font-weight: 500;
}

/* ---- FAQ ---- */
.faq-item {
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
  background: var(--bg-card);
}
.faq-item:hover { border-color: var(--border-mid); }
.faq-q {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text-0);
  font-size: 15px;
  gap: 16px;
}
.faq-q .faq-icon {
  color: var(--neon-cyan);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 24px;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding: 0 24px 20px;
}

/* ---- Timeline / steps ---- */
.step-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}
.step-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 44px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--border-mid), transparent);
}
.step-item:last-child::before { display: none; }
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--neon-cyan);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.15);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border-dim);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
  background: rgba(3, 6, 15, 0.6);
}
.footer a { color: var(--text-2); text-decoration: none; transition: color 0.3s; font-size: 13px; }
.footer a:hover { color: var(--neon-cyan); }
.footer h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-0);
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
}

/* ---- RTL (Arabic) ---- */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .hud-label::before { display: none; }
[dir="rtl"] .hud-label::after {
  content: '';
  width: 24px; height: 1px;
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}
[dir="rtl"] .section-tag::before { display: none; }
[dir="rtl"] .section-tag::after {
  content: '';
  width: 32px; height: 1px;
  background: var(--neon-cyan);
}
[dir="rtl"] .nav-dropdown { left: auto; right: 0; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .step-item::before { left: auto; right: 19px; }

/* ---- Utility ---- */
.container-x { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.text-muted { color: var(--text-2); }
.text-dim { color: var(--text-3); }
.divider-glow {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
  margin: 40px 0;
}

/* ---- AOS override ---- */
[data-aos] { pointer-events: auto !important; }
[data-aos].aos-animate { pointer-events: auto; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--neon-cyan); }

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .hero-section { min-height: auto; padding: 120px 0 60px; }
  .section { padding: 60px 0; }
  .stat-num { font-size: 1.8rem; }
  .nav-desktop { display: none !important; }
}


/* ===== AOS FALLBACK: ensure content visible if CDN fails ===== */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  transition: opacity .6s ease, transform .6s ease !important;
}
/* When AOS actually initializes, it will override these with its own styles */
.aos-init:not(.aos-animate) {
  opacity: 0 !important;
}
.aos-init.aos-animate {
  opacity: 1 !important;
  transform: none !important;
}
/* Safety: force visible after 3s regardless */
@keyframes aos-force-show {
  to { opacity: 1 !important; transform: none !important; }
}
