:root {
  --bg: #04040c;
  --text: #eef0ff;
  --muted: #9aa0b8;
  --accent-1: #7c5cff;
  --accent-2: #00d4ff;
  --accent-3: #ff4ecd;
  --card: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --radius: 18px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

html[dir="rtl"] body { font-family: 'Cairo', 'Inter', sans-serif; }

.container { width: min(1100px, 92%); margin-inline: auto; }

/* ==================== SPACE BACKGROUND ==================== */
#space-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.nebula {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(700px 480px at 12% 8%, rgba(124, 92, 255, 0.16), transparent 70%),
    radial-gradient(800px 560px at 88% 28%, rgba(0, 212, 255, 0.10), transparent 70%),
    radial-gradient(600px 460px at 55% 95%, rgba(255, 78, 205, 0.09), transparent 70%);
}

/* ==================== PLANETS ==================== */
.planets { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.planet { position: absolute; border-radius: 50%; }

.planet-saturn {
  width: 180px; height: 180px; top: 10%; right: 6%;
  background: radial-gradient(circle at 32% 28%, #ffe0b0, #eaa96a 40%, #96613a 72%, #45291a 100%);
  box-shadow: inset -26px -20px 46px rgba(0, 0, 0, 0.6), 0 0 70px rgba(234, 169, 106, 0.28);
  animation: planet-drift 18s ease-in-out infinite alternate;
}
.planet-saturn .ring {
  position: absolute; top: 50%; left: 50%;
  width: 320px; height: 100px;
  border: 11px solid rgba(214, 184, 255, 0.32);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  box-shadow: 0 0 30px rgba(214, 184, 255, 0.12);
}
.planet-saturn .ring::after {
  content: ''; position: absolute; inset: 6px;
  border: 3px solid rgba(255, 255, 255, 0.14); border-radius: 50%;
}

.planet-mars {
  width: 110px; height: 110px; bottom: 12%; left: 5%;
  background: radial-gradient(circle at 34% 30%, #ffb08a, #e2593a 45%, #8c2f1d 75%, #3d130c 100%);
  box-shadow: inset -16px -14px 32px rgba(0, 0, 0, 0.6), 0 0 55px rgba(226, 89, 58, 0.3);
  animation: planet-drift 22s ease-in-out infinite alternate-reverse;
}
.planet-mars::after {
  content: ''; position: absolute; border-radius: 50%;
  width: 22px; height: 22px; top: 26%; left: 52%;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: -30px 24px 0 -6px rgba(0, 0, 0, 0.15), 12px 38px 0 -9px rgba(0, 0, 0, 0.16);
}

.planet-neptune {
  width: 84px; height: 84px; top: 20%; left: 7%;
  background: radial-gradient(circle at 34% 30%, #a8dcff, #3fa0ff 45%, #17357e 78%, #0a1738 100%);
  box-shadow: inset -12px -10px 26px rgba(0, 0, 0, 0.55), 0 0 45px rgba(63, 160, 255, 0.32);
  animation: planet-drift 15s ease-in-out infinite alternate;
}

.orbit {
  position: absolute; top: calc(20% - 28px); left: calc(7% - 28px);
  width: 140px; height: 140px;
  border: 1px dashed rgba(255, 255, 255, 0.16); border-radius: 50%;
  animation: spin 11s linear infinite;
}
.orbit .moon {
  position: absolute; top: -6px; left: 50%;
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #b9c2d8 70%, #7c8499);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes planet-drift { from { transform: translateY(-14px); } to { transform: translateY(16px); } }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(4, 4, 12, 0.6); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; gap: 16px; }
.brand { font-weight: 800; font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: 0.5px; }
.brand span { background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 26px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.25s; }
.nav-links a:hover { color: var(--text); }

.lang-switcher { display: flex; gap: 6px; }
.lang-switcher button { background: var(--card); color: var(--muted); border: 1px solid var(--border); border-radius: 10px; padding: 6px 12px; cursor: pointer; font-weight: 600; transition: all 0.25s; }
.lang-switcher button:hover { color: var(--text); border-color: var(--accent-1); }
.lang-switcher button.active { background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); color: #fff; border-color: transparent; }

/* ==================== HERO ==================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 110px 0 80px;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.hero-content > * { opacity: 0; transform: translateY(40px); animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.25s; }
.hero-content > *:nth-child(3) { animation-delay: 0.45s; }
.hero-content > *:nth-child(4) { animation-delay: 0.6s; }
.hero-content > *:nth-child(5) { animation-delay: 0.8s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); background: var(--card); backdrop-filter: blur(8px);
  padding: 8px 20px; border-radius: 999px; font-size: 0.85rem; color: var(--muted);
  margin-bottom: 28px;
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #2eea8b; position: relative; }
.pulse-dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid #2eea8b; animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.hero-title { font-size: clamp(2.5rem, 7vw, 5rem); font-weight: 900; line-height: 1.1; max-width: 950px; }
.hero-title > span { display: block; }
.typer { min-height: 1.2em; }
.caret { display: inline-block; color: var(--accent-2); animation: blink 0.9s step-end infinite; -webkit-text-fill-color: var(--accent-2); }
@keyframes blink { 50% { opacity: 0; } }

.gradient-text {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.hero-sub { color: var(--muted); max-width: 580px; margin: 26px auto 38px; font-size: 1.12rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.btn { position: relative; overflow: hidden; padding: 15px 32px; border-radius: 999px; text-decoration: none; font-weight: 600; transition: transform 0.25s, box-shadow 0.25s; }
.btn:hover { transform: translateY(-3px) scale(1.03); }
.btn-primary { background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); color: #fff; box-shadow: 0 8px 30px rgba(124, 92, 255, 0.35); }
.btn-primary::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(115deg, transparent, rgba(255,255,255,0.45), transparent); transform: skewX(-20deg); animation: sheen 3.2s ease infinite; }
@keyframes sheen { 0%, 60% { left: -80%; } 100% { left: 130%; } }
.btn-primary:hover { box-shadow: 0 14px 44px rgba(0, 212, 255, 0.45); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--card); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--accent-2); }

.hero-stats { display: flex; gap: 48px; margin-top: 56px; flex-wrap: wrap; justify-content: center; }
.stat { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; column-gap: 2px; position: relative; }
.stat-num, .stat-plus { font-size: 2rem; font-weight: 900; background: linear-gradient(90deg, var(--accent-1), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline; }
.stat-label { width: 100%; text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

.floaters { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.chip {
  position: absolute;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  color: var(--muted); font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: chip-float 6s ease-in-out infinite alternate;
}
.f1 { top: 26%; left: 16%; animation-delay: 0s; color: #ff8a65; }
.f2 { top: 62%; left: 12%; animation-delay: -1.5s; color: #4fc3f7; }
.f3 { top: 34%; right: 16%; animation-delay: -3s; color: #ffe082; }
.f4 { top: 66%; right: 11%; animation-delay: -4.5s; color: #b388ff; }
.f5 { top: 48%; left: 22%; animation-delay: -2.2s; color: var(--accent-2); font-family: monospace; }
@keyframes chip-float { from { transform: translateY(-14px) rotate(-3deg); } to { transform: translateY(14px) rotate(3deg); } }

.scroll-indicator {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 28px; height: 46px; border: 2px solid var(--muted); border-radius: 999px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-indicator span { width: 4px; height: 9px; border-radius: 4px; background: var(--accent-2); animation: scroll-dot 1.6s ease infinite; }
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---- Marquee ---- */
.marquee { overflow: hidden; border-block: 1px solid var(--border); padding: 16px 0; background: rgba(255, 255, 255, 0.02); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 26s linear infinite; direction: ltr; }
.marquee-track span { white-space: nowrap; color: var(--muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 0.85rem; }
@keyframes marquee { to { transform: translateX(calc(-50% - 24px)); } }

/* ---- Sections ---- */
.section { padding: 90px 0; }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 12px auto 48px; max-width: 520px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

.card {
  position: relative; display: block;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; text-decoration: none; color: var(--text);
  overflow: hidden; backdrop-filter: blur(6px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}
.card:hover { border-color: rgba(124, 92, 255, 0.6); box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45); }
.card-glow { position: absolute; inset: 0; background: radial-gradient(500px circle at 50% -20%, rgba(124, 92, 255, 0.18), transparent 60%); opacity: 0; transition: opacity 0.35s; pointer-events: none; }
.card:hover .card-glow { opacity: 1; }
.card h3 { font-size: 1.25rem; margin: 14px 0 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(0, 212, 255, 0.1); color: var(--accent-2); border: 1px solid rgba(0, 212, 255, 0.25); }
.card-link { display: inline-block; margin-top: 16px; color: var(--accent-2); font-size: 0.9rem; font-weight: 600; }
.card-soon .card-tag { background: rgba(255, 78, 205, 0.1); color: var(--accent-3); border-color: rgba(255, 78, 205, 0.3); }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; max-width: 720px; margin-inline: auto; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; text-align: center; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 8px; align-items: center; backdrop-filter: blur(6px); transition: transform 0.3s, border-color 0.3s; }
.contact-card:hover { transform: translateY(-6px); border-color: var(--accent-2); }
.contact-card .icon { font-size: 1.8rem; }
.contact-label { color: var(--muted); font-size: 0.85rem; }
.contact-value { font-weight: 600; font-size: 1.05rem; }

.socials { display: flex; justify-content: center; gap: 16px; margin-top: 44px; flex-wrap: wrap; }
.socials a { display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.95rem; backdrop-filter: blur(6px); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.socials a:hover { transform: translateY(-4px); border-color: var(--accent-1); box-shadow: 0 8px 26px rgba(124, 92, 255, 0.25); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 34px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { color: var(--muted); font-size: 0.9rem; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---- Responsive / motion ---- */
@media (max-width: 900px) {
  .floaters { display: none; }
  .planet-saturn { width: 110px; height: 110px; top: 6%; right: -20px; }
  .planet-saturn .ring { width: 200px; height: 64px; border-width: 7px; }
  .planet-mars { width: 70px; height: 70px; }
  .planet-neptune, .orbit { display: none; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero { min-height: 82vh; }
  .hero-stats { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
