:root {
  --navy: #0b1530;
  --navy-2: #13204a;
  --blue: #2f6bff;
  --cyan: #19d3c5;
  --ink: #111827;
  --muted: #5b6475;
  --bg: #ffffff;
  --bg-alt: #f4f6fb;
  --line: #e3e7f0;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { font-family: var(--font-ar); }

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

a { color: inherit; }

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 21, 48, 0.92);
  backdrop-filter: blur(8px);
  color: #fff;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand strong { color: var(--cyan); font-weight: 800; }

.nav {
  display: flex;
  gap: 24px;
  margin-inline-start: auto;
}

.nav a {
  text-decoration: none;
  opacity: 0.85;
  font-size: 0.95rem;
}

.nav a:hover { opacity: 1; }

.lang-toggle {
  font: inherit;
  font-size: 0.9rem;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.lang-toggle[lang="ar"] { font-family: var(--font-ar); }
.lang-toggle:hover { border-color: var(--cyan); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, var(--navy-2), var(--navy) 60%);
  color: #fff;
  padding: 96px 0 112px;
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; margin-inline-start: 0; }

@media (min-width: 1140px) {
  .hero-inner { margin-inline-start: calc((100vw - 1100px) / 2); }
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(25, 211, 197, 0.12);
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

html[lang="ar"] h1 { line-height: 1.35; letter-spacing: 0; }

.lead {
  margin: 0 0 32px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #2559da; }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover { border-color: #fff; }

/* Decorative pixel grid */
.pixels {
  position: absolute;
  inset-block: 0;
  inset-inline-end: -40px;
  width: 46%;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to left, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent);
}

html[dir="rtl"] .pixels {
  mask-image: linear-gradient(to right, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to right, #000 30%, transparent);
}

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

h2 {
  margin: 0 0 40px;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  letter-spacing: -0.015em;
}

html[lang="ar"] h2 { letter-spacing: 0; }

h3 { margin: 0 0 8px; font-size: 1.2rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 30px rgba(11, 21, 48, 0.08);
  transform: translateY(-2px);
}

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

.icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Portfolio */
.section-note {
  margin: -24px 0 36px;
  color: var(--muted);
}

.work-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.work-body { padding: 22px 24px 26px; }
.work-body p { margin: 0; color: var(--muted); }

.tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
}

.preview {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
}

.preview-web { background: linear-gradient(135deg, #ffb15a, #ff5f6d); }
.preview-app { background: linear-gradient(135deg, #7b5cff, #c86bfa); }
.preview-store { background: linear-gradient(135deg, #16c79a, #0f8f86); }

.mock-browser,
.mock-phone {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.mock-browser {
  width: 76%;
  height: 72%;
  padding: 22px 12px 12px;
  border-radius: 8px;
  position: relative;
}

.mock-browser::before {
  content: "";
  position: absolute;
  top: 8px;
  inset-inline-start: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 10px 0 #febc2e, 20px 0 #28c840;
}

html[dir="rtl"] .mock-browser::before { box-shadow: -10px 0 #febc2e, -20px 0 #28c840; }

.mock-phone {
  width: 30%;
  height: 86%;
  padding: 14px 8px;
  border: 4px solid var(--navy);
  border-radius: 16px;
}

.mock-hero { flex: 0 0 34%; border-radius: 5px; background: var(--bg-alt); }
.mock-line { height: 6px; border-radius: 3px; background: #dfe4ee; }
.mock-line.short { width: 55%; }
.mock-slot { height: 14px; border-radius: 4px; background: #efe9ff; }

.mock-row,
.mock-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mock-row span,
.mock-grid span { border-radius: 4px; background: var(--bg-alt); }

.email {
  margin: -16px 0 28px;
  font-family: var(--font);
}

.email a { color: rgba(255, 255, 255, 0.85); }

.site-footer a { color: inherit; }

.ig {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 10px;
  font-family: var(--font);
  font-weight: 800;
  color: var(--blue);
}

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

/* Contact */
.contact {
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.contact-inner { max-width: 680px; }
.contact h2 { margin-bottom: 12px; }
.contact .lead { margin-inline: auto; margin-bottom: 12px; }

.phone {
  margin: 0 0 28px;
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cyan);
}

.contact .actions { justify-content: center; }

/* Footer */
.site-footer {
  background: #070e22;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.site-footer p { margin: 0; padding: 22px 0; }

/* Small screens */
@media (max-width: 640px) {
  .nav { display: none; }
  .lang-toggle { margin-inline-start: auto; }
  .hero { padding: 64px 0 80px; }
  .pixels { width: 70%; opacity: 0.6; }
  .section { padding: 64px 0; }
  .btn { flex: 1 1 auto; justify-content: center; }
}
