
:root {
  --bg: #ffffff;
  --surface: #f7f7f8;
  --surface-2: #fcfcfd;
  --text: #101114;
  --muted: #61646c;
  --line: #e7e8ec;
  --accent: #0f172a;
  --accent-soft: #f2f5ff;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[lang="ar"] body {
  font-family: Tajawal, Inter, system-ui, sans-serif;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(231, 232, 236, 0.8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.45rem;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-copy strong { font-size: 1.05rem; }

html[lang="ar"] .brand-copy strong {
  padding-inline-end: 7.95rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.93rem;
  white-space: nowrap;
}

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

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  color: var(--muted);
  font-weight: 500;
  flex-wrap: wrap;
}

.nav-links a:hover { color: var(--text); }

.lang-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0.78rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.hero { padding: 4.5rem 0 3rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 1.5rem;
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.85;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: #fff;
  border-color: var(--line);
}

.hero-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem;
  align-self: start;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.stat-row strong { font-size: 0.98rem; }

.stat-row span {
  color: var(--muted);
  font-weight: 600;
  text-align: end;
}

.no-border { border-bottom: 0; }

.steps-section,
.directory-section {
  padding: 1rem 0 4rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.step-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-wrap { min-width: min(100%, 340px); }

.search-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  min-height: 52px;
  border-radius: 16px;
  padding: 0 1rem;
  font: inherit;
}

.search-wrap input::placeholder { color: #9699a3; }

.bots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.bot-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.bot-card-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.bot-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 0.45rem;
  background: var(--surface-2);
}

.bot-meta { min-width: 0; }

.bot-meta h3 {
  margin: 0 0 0.2rem;
  font-size: 1.06rem;
}

.bot-meta p {
  margin: 0;
  color: var(--muted);
}

.bot-description {
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
  min-height: 60px;
}

.command-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9rem;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.command-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.command-box code {
  font-family: Inter, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

html[lang="ar"] .command-box code {
  direction: ltr;
}

.bot-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.card-btn-secondary {
  background: #fff;
  border: 1px solid var(--line);
}

.empty-state {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.legal-page { padding: 3rem 0 4rem; }

.legal-shell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.legal-shell h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.legal-intro {
  margin: 0 0 1.6rem;
  color: var(--muted);
  line-height: 1.8;
}

.legal-section + .legal-section { margin-top: 1.2rem; }

.legal-section h2 {
  margin: 0 0 0.45rem;
  font-size: 1.18rem;
}

.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-wrap {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-wrap p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  gap: 1rem;
  color: var(--muted);
  flex-wrap: wrap;
}

html[dir="rtl"] body,
html[dir="rtl"] .hero-copy,
html[dir="rtl"] .section-head,
html[dir="rtl"] .step-card,
html[dir="rtl"] .bot-card,
html[dir="rtl"] .legal-shell,
html[dir="rtl"] .footer-wrap {
  text-align: right;
}

html[dir="rtl"] .nav {
  flex-direction: row;
}

html[dir="rtl"] .brand {
  direction: rtl;
}

html[dir="rtl"] .brand-copy {
  align-items: flex-end;
  text-align: right;
}

html[dir="rtl"] .nav-actions,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .footer-links {
  flex-direction: row;
}

html[dir="rtl"] .nav-actions {
  margin-inline-start: auto;
}

html[dir="rtl"] .section-head,
html[dir="rtl"] .steps-grid,
html[dir="rtl"] .bots-grid {
  direction: rtl;
}

html[dir="rtl"] .stat-row { text-align: right; }
html[dir="rtl"] .stat-row span { text-align: left; }

html[dir="rtl"] .search-wrap input,
html[dir="rtl"] .hero-text,
html[dir="rtl"] .legal-intro,
html[dir="rtl"] .legal-section p,
html[dir="rtl"] .bot-description,
html[dir="rtl"] .bot-meta p,
html[dir="rtl"] .step-card p,
html[dir="rtl"] .bot-meta h3 {
  text-align: right;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .bots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .hero-card {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--container));
  }

  .nav {
    min-height: 72px;
    padding: 0.75rem 0;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    display: flex;
    margin-inline-start: auto;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .hero-copy h1 {
    font-size: 2.15rem;
    line-height: 1.12;
  }

  .hero-text {
    font-size: 1rem;
  }

  .hero-actions,
  .section-head,
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn,
  .card-btn {
    width: 100%;
  }

  .search-wrap {
    width: 100%;
    min-width: 0;
  }

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

  .legal-shell {
    padding: 1.35rem;
    border-radius: 22px;
  }

  .footer-wrap {
    padding: 1rem 0;
  }

  html[dir="rtl"] .footer-wrap,
  html[dir="rtl"] .hero-actions,
  html[dir="rtl"] .section-head {
    align-items: stretch;
  }

  html[dir="rtl"] .hero-actions,
  html[dir="rtl"] .footer-links {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {


  .step-card,
  .bot-card,
  .hero-card {
    border-radius: 20px;
  }

  .brand-copy span {
    white-space: normal;
  }
}