/* 
 * MechaMind Design System v1.0.0
 * Grayscale Design System
 */

/* ========================================
   1. CSS RESET & BASE
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ===== Colors - Grayscale ===== */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;

  /* ===== Semantic Colors ===== */
  --green-600: #16a34a;
  --green-100: #dcfce7;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --yellow-600: #ca8a04;
  --yellow-100: #fef9c3;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;

  /* ===== Spacing (8px Grid) ===== */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  --space-24: 6rem;     /* 96px */

  /* ===== Shadows ===== */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* ===== Border Radius ===== */
  --rounded-sm: 0.25rem;   /* 4px */
  --rounded: 0.375rem;     /* 6px */
  --rounded-md: 0.5rem;    /* 8px */
  --rounded-lg: 0.75rem;   /* 12px */
  --rounded-xl: 1rem;      /* 16px */
  --rounded-2xl: 1.5rem;   /* 24px */
  --rounded-3xl: 2rem;     /* 32px */
  --rounded-full: 9999px;

  /* ===== Transitions ===== */
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   2. TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: 3.75rem; }  /* 60px */
h2 { font-size: 3rem; }     /* 48px */
h3 { font-size: 2.25rem; }  /* 36px */
h4 { font-size: 1.875rem; } /* 30px */
h5 { font-size: 1.5rem; }   /* 24px */
h6 { font-size: 1.25rem; }  /* 20px */

p {
  color: var(--gray-700);
  line-height: 1.75;
}

/* ========================================
   3. LAYOUT & CONTAINER
   ======================================== */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section {
  padding: var(--space-20) 0;
}

/* ========================================
   4. HEADER & NAVIGATION
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  padding: var(--space-4) 0;
  transition: all var(--transition-slow);
}

.header.scrolled {
  box-shadow: var(--shadow-lg);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
}

.nav-logo-gradient {
  background: linear-gradient(135deg, var(--gray-700), var(--gray-900));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-base);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--rounded-lg);
}

.nav-links a:hover {
  color: var(--gray-900);
  background: var(--gray-50);
}

.nav-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.language-selector {
  position: relative;
}

.language-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--gray-100);
  border: none;
  border-radius: var(--rounded-lg);
  cursor: pointer;
  font-weight: 500;
  color: var(--gray-700);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.language-btn:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

.language-dropdown {
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--rounded-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  min-width: 150px;
  display: none;
  z-index: 100;
}

.language-dropdown.active {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.language-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--gray-700);
  text-decoration: none;
  border-radius: var(--rounded);
  transition: all var(--transition-base);
}

.language-dropdown a:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  font-size: 1.5rem;
}

/* Mobile Menu Auth Buttons */
.mobile-auth-buttons {
  display: none;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border-top: 1px solid var(--gray-200);
  margin-top: var(--space-4);
}

/* ========================================
   5. BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--rounded-xl);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-slow);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gray-900);
  color: var(--white);
  box-shadow: var(--shadow-xl);
}

.btn-primary:hover {
  background: var(--gray-800);
  box-shadow: var(--shadow-2xl);
  transform: scale(1.05);
}

.btn-primary:active {
  transform: scale(0.95);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-900);
  border: 2px solid var(--gray-900);
  box-shadow: var(--shadow-lg);
}

.btn-secondary:hover {
  background: var(--gray-50);
  box-shadow: var(--shadow-xl);
}

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--gray-900);
  color: var(--gray-900);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
}

.btn-lg {
  padding: var(--space-6) var(--space-12);
  font-size: 1.125rem;
}

/* ========================================
   6. HERO SECTION
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, var(--gray-50), var(--white));
  padding-top: var(--space-24);
  position: relative;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-8);
}

.hero-logo {
  font-size: 5rem;
  margin-bottom: var(--space-6);
  animation: float 3s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5rem);
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--gray-700), var(--gray-900));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--gray-700);
  margin-bottom: var(--space-4);
  font-weight: 600;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: var(--space-8);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   7. FEATURES SECTION
   ======================================== */
.features {
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--space-16);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-8);
}

.feature-card {
  padding: var(--space-8);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--rounded-2xl);
  transition: all var(--transition-slow);
}

.feature-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
  color: var(--gray-900);
}

.feature-description {
  color: var(--gray-600);
  line-height: 1.75;
}

/* ========================================
   8. DOWNLOAD SECTION
   ======================================== */
.download-section {
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
  color: var(--white);
  text-align: center;
}

.download-section .section-title {
  color: var(--white);
}

.download-section p {
  color: var(--gray-300);
  font-size: 1.25rem;
  margin-bottom: var(--space-8);
}

.download-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  background: var(--white);
  color: var(--gray-900);
  border-radius: var(--rounded-xl);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-slow);
  box-shadow: var(--shadow-xl);
}

.download-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
}

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

/* ========================================
   9. FOUNDERS SECTION
   ======================================== */
.founders {
  background: var(--gray-50);
}

.founders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-12);
  max-width: 900px;
  margin: 0 auto;
}

.founder-card {
  background: var(--white);
  padding: var(--space-8);
  border-radius: var(--rounded-3xl);
  box-shadow: var(--shadow-xl);
  text-align: center;
  transition: all var(--transition-slow);
}

.founder-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-2xl);
}

.founder-avatar {
  width: 128px;
  height: 128px;
  background: linear-gradient(135deg, var(--gray-700), var(--gray-900));
  border-radius: var(--rounded-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
  font-size: 3rem;
  color: var(--white);
  font-weight: 700;
}

.founder-name {
  font-size: 1.875rem;
  margin-bottom: var(--space-2);
}

.founder-role {
  color: var(--gray-600);
  font-weight: 500;
  margin-bottom: var(--space-4);
}

.founder-bio {
  color: var(--gray-600);
  line-height: 1.75;
}

/* ========================================
   10. FOOTER
   ======================================== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-20) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-section h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  transition: color var(--transition-base);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: var(--space-8);
  text-align: center;
}

/* ========================================
   11. ANIMATIONS
   ======================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   12. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
}

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

  .menu-toggle {
    display: block;
  }

  .nav-actions {
    display: none;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: var(--space-4);
    box-shadow: var(--shadow-xl);
    z-index: 999;
  }

  .mobile-auth-buttons {
    display: flex;
  }

  .nav-links.active .mobile-auth-buttons {
    display: flex;
  }

  .hero {
    padding-top: var(--space-16);
  }

  .hero-actions {
    flex-direction: column;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .btn {
    width: 100%;
  }

  h1 { font-size: 2rem; }
}

/* ========================================
   13. UTILITIES
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

.hidden { display: none; }

/* RTL Support for Arabic */
[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .hero-actions,
[dir="rtl"] .download-buttons {
  direction: rtl;
}
