/* ============================================
   MAJO LANDING PAGE — CYBERPUNK NEON THEME
   ============================================ */

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

:root {
  /* Colors */
  --bg-deep: #06060c;
  --bg-surface: #0d0d18;
  --bg-card: #111124;
  --bg-card-hover: #181838;

  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-600: #9333ea;
  --purple-700: #7c3aed;

  --green-400: #34d399;
  --green-500: #10b981;
  --cyan-400: #22d3ee;

  --gold-400: #facc15;

  --text-primary: #f0f0f5;
  --text-secondary: #9494b8;
  --text-muted: #5e5e7e;

  /* Gradients */
  --gradient-neon: linear-gradient(135deg, var(--purple-500) 0%, var(--cyan-400) 50%, var(--green-500) 100%);
  --gradient-card: linear-gradient(160deg, rgba(168, 85, 247, 0.08) 0%, rgba(16, 185, 129, 0.06) 100%);
  --gradient-card-border: linear-gradient(160deg, rgba(168, 85, 247, 0.35), rgba(16, 185, 129, 0.25));

  /* Spacing */
  --section-pad: clamp(4rem, 10vh, 8rem);
  --container-max: 1200px;

  /* Glows */
  --glow-purple: 0 0 60px rgba(168, 85, 247, 0.35), 0 0 120px rgba(168, 85, 247, 0.15);
  --glow-green: 0 0 60px rgba(16, 185, 129, 0.3), 0 0 120px rgba(16, 185, 129, 0.1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* RTL Support */
body.rtl {
  direction: rtl;
  text-align: right;
  font-family: 'Tahoma', 'Segoe UI', 'Outfit', sans-serif;
  /* Fallback for Arabic */
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.section-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* ----- GRADIENT TEXT ----- */
.gradient-text {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- SECTION SHARED ----- */
.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple-400);
  margin-bottom: 0.5rem;
  text-align: center;
}

section h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  line-height: 1.15;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 3.5rem;
}

/* ==============================
   HERO SECTION
   ============================== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Background Effects */
.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  animation: orbFloat 8s ease-in-out infinite alternate;
}

.orb-purple {
  width: 500px;
  height: 500px;
  background: var(--purple-600);
  top: -10%;
  left: -10%;
}

.orb-green {
  width: 400px;
  height: 400px;
  background: var(--green-500);
  bottom: -5%;
  right: -5%;
  animation-delay: -4s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(40px, 30px) scale(1.08);
  }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 80%);
}

/* Navbar */
.navbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.5rem, 4vw, 3rem);
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.lang-icon {
  font-size: 1rem;
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: var(--purple-400);
  transition: all 0.3s ease;
}

.nav-cta:hover {
  background: rgba(168, 85, 247, 0.25);
  box-shadow: var(--glow-purple);
  transform: translateY(-1px);
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  padding: 2rem clamp(1.5rem, 4vw, 3rem) 3rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.hero-text {
  flex: 1;
  max-width: 560px;
}

/* RTL Adjustment for Hero Text */
.rtl .hero-text {
  text-align: right;
}

.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-400);
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.35rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 9999px;
}

.hero-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-subtitle strong {
  color: var(--gold-400);
}

/* CTA Buttons */
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  border-radius: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-appstore {
  background: linear-gradient(135deg, var(--purple-700), var(--purple-600));
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.btn-appstore::before {
  background: linear-gradient(135deg, var(--purple-600), var(--purple-500));
}

.btn-appstore:hover {
  box-shadow: var(--glow-purple);
  transform: translateY(-2px);
}

.btn-appstore:hover::before {
  opacity: 1;
}

.btn-playstore {
  background: linear-gradient(135deg, #064e3b, #065f46);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.btn-playstore::before {
  background: linear-gradient(135deg, #065f46, #047857);
}

.btn-playstore:hover {
  box-shadow: var(--glow-green);
  transform: translateY(-2px);
}

.btn-playstore:hover::before {
  opacity: 1;
}

.btn svg,
.btn div {
  position: relative;
  z-index: 1;
}

.btn-small-text {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.75;
  line-height: 1;
}

.btn-big-text {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

/* RTL Button Text Alignment */
.rtl .btn div {
  text-align: right;
  margin-right: 0.5rem;
}

.rtl .btn svg {
  order: 1;
  /* Move icon to right (start) or left (end)? Actually flex-direction reverse handle this naturally by dir=rtl, checking visual */
}

/* Mockup */
.hero-mockup {
  position: relative;
  flex: 0 0 auto;
  width: clamp(260px, 30vw, 380px);
}

.mockup-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, rgba(16, 185, 129, 0.15) 40%, transparent 70%);
  filter: blur(40px);
  animation: pulseGlow 4s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

.mockup-img {
  position: relative;
  z-index: 2;
  width: 100%;
  filter: drop-shadow(0 20px 60px rgba(168, 85, 247, 0.3));
  animation: floatPhone 6s ease-in-out infinite;
}

@keyframes floatPhone {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

/* Scroll Indicator */
.scroll-indicator {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.scroll-arrow {
  animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

/* ==============================
   COMMENT ÇA MARCHE
   ============================== */
#comment-ca-marche {
  padding: var(--section-pad) 0;
  background: var(--bg-surface);
  position: relative;
}

#comment-ca-marche::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), rgba(16, 185, 129, 0.3), transparent);
}

.steps-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.step-card {
  background: var(--gradient-card);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 280px;
  position: relative;
  transition: all 0.4s ease;
}

.step-card:hover {
  border-color: rgba(168, 85, 247, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(168, 85, 247, 0.12);
}

.step-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.step-number {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gradient-neon);
  color: var(--bg-deep);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* RTL Number Positioning */
.rtl .step-number {
  right: auto;
  left: -8px;
}

.step-icon {
  width: 64px;
  height: 64px;
}

.step-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-card p strong {
  color: var(--text-primary);
}

.step-connector {
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* RTL Steps Flow (Reverse connector transform if directional) */
.rtl .step-connector {
  transform: scaleX(-1);
}

/* ==============================
   FEATURES
   ============================== */
#features {
  padding: var(--section-pad) 0;
  position: relative;
}

#features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), rgba(168, 85, 247, 0.3), transparent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

/* RTL Align Features */
.rtl .feature-card {
  text-align: right;
  /* Default body is rtl and text-align right, but ensure */
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-neon);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card-accent {
  border-color: rgba(168, 85, 247, 0.12);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-card p strong {
  color: var(--text-primary);
}

/* Stats Bar */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.12);
  border-radius: 20px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-suffix {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* RTL Stat Suffix Order */
.rtl .stat {
  direction: ltr;
  /* Keep numbers LTR for clarity with suffix? */
  /* Or handle order via flex? */
}

/* Wait, Arabic numbers are LTR. But context is RTL.
   "50000+" -> in Arabic usually "50000+" reading right to left might be confusing if not handled.
   Keeping LTR for stats block usually safer for digits.
*/
.rtl .stat-number,
.rtl .stat-suffix {
  direction: ltr;
  display: inline-block;
}


.stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
  direction: rtl;
  /* Reset to RTL for text */
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

/* ==============================
   CTA FINAL
   ============================== */
#cta-final {
  padding: var(--section-pad) 0;
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}

#cta-final::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-final-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.cta-final-inner h2 {
  margin-bottom: 1rem;
}

.cta-final-inner>p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.cta-final-inner .hero-ctas {
  justify-content: center;
}

/* ==============================
   LEGAL PAGES
   ============================== */
.legal-container {
  padding: 120px 20px 60px;
  min-height: calc(100vh - 250px);
  max-width: 800px;
  margin: 0 auto;
}

.legal-content {
  background: var(--bg-card);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.legal-content h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.legal-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-align: left;
}

.rtl .legal-content h2 {
  text-align: right;
}

.legal-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .legal-content {
    padding: 2rem 1.5rem;
  }

  .legal-content h1 {
    font-size: 2rem;
  }
}

/* ==============================
   FOOTER
   ============================== */
#footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: flex-start;
}

.footer-brand {
  flex: 1 1 200px;
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--purple-400);
}

.footer-bottom {
  width: 100%;
  text-align: center;
  padding-top: 2rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

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

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
    padding-top: 1rem;
  }

  .hero-text {
    max-width: 100%;
  }

  /* RTL Reset for Mobile Center Alignment */
  .rtl .hero-text {
    text-align: center;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-mockup {
    width: 260px;
  }

  .steps-grid {
    flex-direction: column;
    gap: 1rem;
  }

  .step-connector {
    transform: rotate(90deg);
    width: 40px;
  }

  /* Reset connector rotate for RTL vertical stack?
     90deg is vertical. It works same for RTL vertical flow. */
  .rtl .step-connector {
    transform: rotate(90deg);
  }


  .step-card {
    max-width: 100%;
  }

  .stats-bar {
    gap: 2rem;
  }

  .stat-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}