/* ─────────────────────────────────────────
   كوادر — Arabic-first Contra clone
   Minimalist, RTL, Cairo font
───────────────────────────────────────── */

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --dark:    #1a1a1a;
  --dark2:   #222834;
  --mid:     #4a4a4a;
  --muted:   #888;
  --border:  #e2e4e9;
  --bg:      #ffffff;
  --bg2:     #f7f8fa;
  --accent:  #222834;
  --radius:  14px;
  --radius-sm: 8px;
  --font:    'Cairo', system-ui, sans-serif;
  --shadow:  0 2px 12px rgba(0,0,0,.07);
  --shadow-hover: 0 6px 28px rgba(0,0,0,.13);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { display: block; }

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

/* ── Buttons ── */
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark2);
  color: #fff;
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border: 2px solid var(--dark2);
  cursor: pointer;
  transition: opacity var(--transition);
  white-space: nowrap;
}
.btn-dark:hover { opacity: .85; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--dark);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-ghost:hover { background: var(--bg2); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--dark);
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border: 2px solid var(--dark2);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover { background: var(--dark2); color: #fff; }

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--dark2);
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  padding: 14px 32px;
  border: 2px solid #fff;
  cursor: pointer;
  transition: opacity var(--transition);
}
.btn-white:hover { opacity: .9; }

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  padding: 14px 32px;
  border: 2px solid rgba(255,255,255,.5);
  cursor: pointer;
  transition: border-color var(--transition);
}
.btn-outline-white:hover { border-color: #fff; }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 64px;
}

.logo {
  font-size: 26px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -0.5px;
  margin-left: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  padding: 8px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition);
}
.nav-btn:hover { background: var(--bg2); }

.chevron { font-style: normal; font-size: 18px; line-height: 1; }

.nav-labs { color: var(--muted); }
.badge {
  background: #f0fdf4;
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid #bbf7d0;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-right: auto;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  display: block;
  transition: all var(--transition);
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  text-align: center;
}

.hero-bg-right,
.hero-bg-left {
  position: absolute;
  top: -60px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .12;
  pointer-events: none;
}
.hero-bg-right {
  right: -80px;
  background: #6366f1;
}
.hero-bg-left {
  left: -80px;
  background: #ec4899;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mid);
  padding: 6px 18px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(42px, 7vw, 80px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: var(--dark);
}

.hero-accent {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--mid);
  max-width: 560px;
  margin: 0 auto 36px;
  font-weight: 400;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.avatars {
  display: flex;
  align-items: center;
}
.avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  margin-left: -10px;
}
.avatars img:first-child { margin-left: 0; }

.proof-text strong { color: var(--dark); }

/* ── Section Shared ── */
section { padding: 80px 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 36px;
}
.section-header.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.section-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--dark);
}

.see-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--transition);
  white-space: nowrap;
}
.see-all:hover { color: var(--dark); }

/* ── Trending Topics ── */
.trending { background: var(--bg2); }

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.topic-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--dark2);
}

.topic-icon { font-size: 28px; }
.topic-name { font-size: 15px; font-weight: 700; color: var(--dark); }
.topic-count { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ── Projects ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow var(--transition), transform var(--transition);
}
.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.project-cover {
  position: relative;
  height: 180px;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.35));
}
.project-cat {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.3);
}

.project-body { padding: 16px; }

.project-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.author-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.author-title { font-size: 12px; color: var(--muted); }

.project-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 14px;
  color: var(--dark);
}

.project-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
}
.meta-item { display: flex; align-items: center; gap: 4px; }

/* ── How It Works ── */
.how { background: var(--bg); }

.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 56px auto 0;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 20px;
}
.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--dark2);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.step-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--dark);
}
.step-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.7;
}

.step-arrow {
  font-size: 28px;
  color: var(--border);
  padding-top: 16px;
  flex-shrink: 0;
}

/* ── Independents ── */
.independents { background: var(--bg2); }

.ind-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.ind-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
}
.ind-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--dark2);
}

.ind-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ind-info { flex: 1; min-width: 0; }
.ind-name { font-size: 15px; font-weight: 700; color: var(--dark); }
.ind-role { font-size: 13px; color: var(--muted); margin: 2px 0 6px; }
.ind-rate { font-size: 13px; font-weight: 600; color: var(--mid); }

.ind-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
}
.ind-badge.available {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
.ind-badge.busy {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* ── Trust ── */
.trust {
  background: var(--dark2);
  padding: 60px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.trust-num {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}
.trust-label {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
  font-weight: 500;
}

/* ── CTA Banner ── */
.cta-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 100px 0;
  text-align: center;
}

.cta-inner { max-width: 640px; margin: 0 auto; }

.cta-title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.cta-sub {
  font-size: 17px;
  color: rgba(255,255,255,.7);
  margin-bottom: 36px;
  line-height: 1.7;
}
.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Footer ── */
.footer {
  background: var(--dark);
  padding: 64px 0 0;
}

.footer-inner {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand { flex: 0 0 240px; }
.logo-light { color: #fff; }
.footer-tagline {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  margin-top: 10px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: border-color var(--transition), color var(--transition);
}
.social-link:hover { border-color: rgba(255,255,255,.5); color: #fff; }

.footer-links {
  display: flex;
  gap: 48px;
  flex: 1;
  flex-wrap: wrap;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 120px;
}
.footer-col-title {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
  font-weight: 500;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding: 20px 0;
}
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,.35);
  flex-wrap: wrap;
  gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .steps-grid {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .step-arrow {
    transform: rotate(-90deg);
    padding: 0;
  }
  .footer-inner { gap: 40px; }
  .footer-brand { flex: 0 0 100%; }
}

@media (max-width: 720px) {
  .nav-links, .nav-auth { display: none; }
  .hamburger { display: flex; }
  .logo { margin-left: 0; }

  .hero { padding: 60px 0 50px; }
  section { padding: 60px 0; }

  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }
  .ind-grid { grid-template-columns: 1fr; }

  .footer-links { gap: 32px; }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: -1px; }
  .hero-cta { flex-direction: column; width: 100%; }
  .btn-lg { width: 100%; justify-content: center; }
  .cta-actions { flex-direction: column; width: 100%; }
  .topics-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
}
