:root {
  --bg: #080c14;
  --bg-alt: #0d1320;
  --surface: rgba(16, 23, 38, 0.85);
  --surface-solid: #101726;
  --border: rgba(148, 163, 184, 0.14);
  --border-hover: rgba(16, 185, 129, 0.45);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --font-ar: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

html[dir="ltr"] body {
  font-family: var(--font-en);
}

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

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

.container-narrow {
  width: min(820px, 92%);
}

/* Subtle architectural background */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  z-index: -2;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: -1;
}

.bg-glow-1 {
  width: 440px;
  height: 440px;
  top: -120px;
  inset-inline-start: -100px;
  background: rgba(16, 185, 129, 0.13);
}

.bg-glow-2 {
  width: 420px;
  height: 420px;
  bottom: 5%;
  inset-inline-end: -140px;
  background: rgba(56, 189, 248, 0.11);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand-text {
  white-space: nowrap;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}

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

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

.btn-lang {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.42rem 0.72rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-lang:hover {
  border-color: var(--cyan);
  background: var(--cyan-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.45rem;
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 0.95rem;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #03150e;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.36);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hero */
.hero {
  padding: 4.5rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
  line-height: 1.25;
  font-weight: 800;
}

.text-gradient {
  background: linear-gradient(120deg, #10b981, #38bdf8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.tech-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-strip span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--cyan);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.metric-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--emerald);
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: block;
}

.hero-card-footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: #6ee7b7;
  font-weight: 600;
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: rgba(13, 19, 32, 0.75);
  border-block: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}

.section-head h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
}

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

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--emerald-soft);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.45);
}

/* Project Cards */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.25s, transform 0.25s;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.project-card.hidden-card {
  display: none;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.card-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.tag-emerald { background: var(--emerald-soft); color: #6ee7b7; }
.tag-cyan { background: var(--cyan-soft); color: var(--cyan); }
.tag-amber { background: var(--amber-soft); color: #fcd34d; }

.card-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.project-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.18rem;
  line-height: 1.45;
}

.project-card p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.card-bullets {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.2rem;
  color: #cbd5e1;
  font-size: 0.89rem;
  display: grid;
  gap: 0.45rem;
}

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
  margin-bottom: 1.1rem;
}

.card-stack span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Interactive Simulator */
.sim-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
}

.sim-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sim-tab.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(56, 189, 248, 0.15));
  border-color: var(--emerald);
  color: var(--text);
}

.sim-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.sim-panel {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sim-panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.sim-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--emerald-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
}

.sim-panel-header strong {
  display: block;
  font-size: 0.95rem;
}

.sim-sub {
  font-size: 0.78rem;
  color: var(--emerald);
}

.step-counter {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sim-chat-body {
  padding: 1.2rem;
  min-height: 290px;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-bubble {
  max-width: 88%;
  padding: 0.72rem 0.95rem;
  border-radius: 12px;
  font-size: 0.89rem;
  line-height: 1.55;
  animation: fadeUp 0.25s ease;
}

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

.chat-user {
  align-self: flex-start;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.chat-bot {
  align-self: flex-end;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.chat-system {
  align-self: center;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.38);
  color: #fde68a;
  font-size: 0.83rem;
  text-align: center;
}

.sim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.95rem 1.2rem;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.sim-backend {
  padding-bottom: 1rem;
}

.exec-badge {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--emerald-soft);
  color: var(--emerald);
}

.backend-block {
  padding: 0.95rem 1.2rem 0;
}

.backend-block h4 {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.node-pill {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
}

.code-box {
  margin: 0;
  padding: 0.85rem;
  border-radius: 10px;
  background: #060910;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: #a7f3d0;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  max-height: 165px;
}

.alert-preview {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.85rem;
  color: #fde68a;
  white-space: pre-line;
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem;
}

.price-card.featured {
  border-color: var(--emerald);
  box-shadow: 0 18px 50px rgba(16, 185, 129, 0.14);
}

.popular-badge {
  position: absolute;
  top: -12px;
  inset-inline-end: 1.25rem;
  background: var(--emerald);
  color: #03150e;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
}

.price-tier {
  font-weight: 700;
  color: var(--cyan);
  font-size: 0.92rem;
}

.price-amount {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  margin: 0.45rem 0 0.25rem;
}

.per-month {
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-muted);
}

.price-note {
  margin: 0 0 1.2rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.price-card ul {
  margin: 0 0 1.5rem;
  padding-inline-start: 1.15rem;
  display: grid;
  gap: 0.55rem;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.price-card .btn {
  margin-top: auto;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 1.1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: start;
  cursor: pointer;
}

.faq-icon {
  font-family: var(--font-mono);
  color: var(--emerald);
  font-size: 1.2rem;
}

.faq-a {
  padding: 0 1.25rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.faq-a p {
  margin: 0;
}

/* Contact & Brief Builder */
.contact-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  background: linear-gradient(145deg, rgba(16, 23, 38, 0.95), rgba(10, 18, 30, 0.95));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-info h2 {
  margin: 0.35rem 0 0.75rem;
  font-size: 1.65rem;
}

.contact-info p {
  color: var(--text-muted);
  margin: 0 0 1.4rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brief-builder {
  display: grid;
  gap: 0.9rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form-row label {
  font-size: 0.84rem;
  font-weight: 700;
  color: #cbd5e1;
}

.form-row select,
.form-row input,
.form-row textarea {
  width: 100%;
  background: #070b12;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-row select:focus,
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--emerald);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

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

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

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

/* Responsive */
@media (max-width: 920px) {
  .hero-grid,
  .projects-grid,
  .sim-stage,
  .pricing-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .brand-badge {
    display: none;
  }
}

@media (max-width: 720px) {
  .nav-inner {
    min-height: 60px;
    gap: 0.5rem;
  }

  .brand {
    font-size: 0.94rem;
    gap: 0.4rem;
  }

  .nav-actions {
    gap: 0.45rem;
  }

  .nav-actions .btn-sm {
    padding: 0.38rem 0.65rem;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  .btn-lang {
    padding: 0.36rem 0.55rem;
    font-size: 0.75rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    inset-inline: 0;
    background: var(--surface-solid);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.9rem;
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding-top: 2.75rem;
  }

  .contact-card {
    padding: 1.35rem;
  }
}
