/* ============================================================
   Smart Networks — smart-networks.iq
   Single-page landing · EN (LTR) + AR (RTL via [dir="rtl"])
   Brand purple: #8e3596
   ============================================================ */

:root {
  --purple: #8e3596;
  --purple-600: #7c2e84;
  --purple-700: #672070;
  --purple-050: #f6eef8;
  --purple-100: #ecdcef;

  --ink: #17121d;
  --ink-2: #211a2a;
  --ink-3: #2c2238;

  --bg: #ffffff;
  --bg-soft: #f8f6fa;
  --line: #e9e3f0;
  --line-dark: rgba(255, 255, 255, 0.14);

  --text: #2c2533;
  --muted: #6e6579;
  --lav: #cdbcd8;
  --lav-soft: rgba(205, 188, 216, 0.85);

  --radius: 16px;
  --radius-sm: 12px;

  --shadow-1: 0 1px 2px rgba(23, 18, 29, 0.05), 0 8px 24px rgba(23, 18, 29, 0.06);
  --shadow-2: 0 2px 6px rgba(23, 18, 29, 0.07), 0 18px 44px rgba(23, 18, 29, 0.12);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[lang="ar"] {
  --font: "Cairo", "Segoe UI", Tahoma, system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; }

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-700); }

ul { list-style: none; }

.container {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

section { padding-block: clamp(72px, 9vw, 116px); }

/* ---------- Type helpers ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}

html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 0.85rem; }

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--purple);
  border-radius: 2px;
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  line-height: 1.22;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

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

.lead {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 62ch;
}

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 6px 18px rgba(142, 53, 150, 0.35);
}
.btn-primary:hover {
  background: var(--purple-600);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(142, 53, 150, 0.42);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-2px);
}

.btn-outline {
  background: #fff;
  color: var(--purple);
  border-color: var(--purple-100);
}
.btn-outline:hover {
  border-color: var(--purple);
  transform: translateY(-2px);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 60;
  background: rgba(23, 18, 29, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s;
}

.site-header.scrolled {
  background: rgba(23, 18, 29, 0.92);
  border-bottom-color: var(--line-dark);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 750;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: #fff; }

.brand .mark { width: 44px; height: 34px; flex: none; }

.brand small {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--lav-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[lang="ar"] .brand small { letter-spacing: 0; font-size: 0.72rem; }

.main-nav { display: flex; align-items: center; gap: 6px; }

.main-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.93rem;
  font-weight: 550;
  padding: 9px 13px;
  border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.lang-switch {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  padding: 9px 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  transition: border-color 0.2s, background 0.2s;
}
.lang-switch:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.06); }

.nav-cta .btn { padding: 11px 22px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: #fff;
}
.nav-toggle svg { margin-inline: auto; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 82% -10%, rgba(142, 53, 150, 0.38), transparent 62%),
    radial-gradient(700px 420px at -8% 110%, rgba(142, 53, 150, 0.22), transparent 60%),
    linear-gradient(160deg, #1b1424 0%, #17121d 55%, #241531 100%);
  color: #fff;
  padding-top: 176px;
  padding-bottom: 96px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='200' viewBox='0 0 260 200'%3E%3Cg fill='%23ffffff' stroke='%23ffffff' opacity='0.05'%3E%3Ccircle cx='40' cy='100' r='20' fill='none' stroke-width='10'/%3E%3Cpath d='M 95 50 L 145 50 L 145 150 L 195 150 M 55 100 L 225 100' stroke-width='10' fill='none'/%3E%3Ccircle cx='95' cy='50' r='13' stroke='none'/%3E%3Ccircle cx='225' cy='100' r='13' stroke='none'/%3E%3Ccircle cx='195' cy='150' r='13' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px;
  opacity: 0.5;
  mask-image: radial-gradient(760px 560px at 78% 30%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(760px 560px at 78% 30%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 780px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(142, 53, 150, 0.18);
  border: 1px solid rgba(190, 120, 200, 0.4);
  color: #e9d5ee;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 26px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d478dd;
  box-shadow: 0 0 0 4px rgba(212, 120, 221, 0.22);
}

.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.7rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
}

html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.28; font-weight: 700; }

.hero h1 .accent { color: #d888e0; }

.hero .sub {
  font-size: 1.13rem;
  color: var(--lav);
  max-width: 58ch;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 64px; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--line-dark);
  padding-top: 34px;
  max-width: 820px;
}

.stat .num {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.stat .num span { color: #d888e0; }
.stat .label { font-size: 0.85rem; color: var(--lav-soft); margin-top: 2px; }

/* ---------- Trust band ---------- */

.trust-band {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
  padding-block: 22px;
}

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  text-align: center;
}

.trust-row .qi-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 30px;
  padding-inline: 10px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.trust-row p { color: var(--muted); font-size: 0.97rem; }
.trust-row p strong { color: var(--ink); font-weight: 700; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 6vw, 72px);
  align-items: start;
}

.about-copy p + p { margin-top: 16px; }
.about-copy p { color: var(--muted); }
.about-copy p strong { color: var(--ink); }

.mv-stack { display: grid; gap: 16px; }

.mv-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-1);
}

.mv-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 8px;
}

.mv-card h3 .ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--purple-050);
  color: var(--purple);
  display: grid;
  place-items: center;
  flex: none;
}

.mv-card p { font-size: 0.95rem; color: var(--muted); }

/* ---------- Services ---------- */

.services { background: var(--bg-soft); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.svc-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-1);
  transition: transform 0.3s var(--ease), box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}

.svc-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2);
  border-color: var(--purple-100);
}

.svc-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-700) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 18px rgba(142, 53, 150, 0.3);
}

.svc-card h3 { font-size: 1.13rem; font-weight: 750; color: var(--ink); margin-bottom: 10px; }

.svc-card > p { font-size: 0.94rem; color: var(--muted); margin-bottom: 18px; }

.svc-list { margin-top: auto; display: grid; gap: 8px; }

.svc-list li {
  position: relative;
  padding-inline-start: 18px;
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 530;
}

.svc-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.85;
}

/* ---------- Why us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 30px;
}

.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.why-item .ico {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--purple-050);
  color: var(--purple);
  display: grid;
  place-items: center;
}

.why-item h3 { font-size: 1rem; font-weight: 720; color: var(--ink); margin-bottom: 4px; }
.why-item p { font-size: 0.91rem; color: var(--muted); }

/* ---------- Qi Group ---------- */

.qi {
  background:
    radial-gradient(720px 420px at 88% 0%, rgba(142, 53, 150, 0.4), transparent 60%),
    linear-gradient(150deg, #1b1424 0%, #17121d 60%, #221233 100%);
  color: #fff;
}

.qi-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

.qi .eyebrow { color: #d888e0; }
.qi .eyebrow::before { background: #d888e0; }

.qi h2 { color: #fff; }

.qi p { color: var(--lav); }
.qi p + p { margin-top: 14px; }
.qi p strong { color: #fff; font-weight: 700; }

.qi-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  color: #e9aef0;
  font-weight: 650;
  font-size: 0.97rem;
}
.qi-link:hover { color: #fff; }

.qi-panel {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-dark);
  border-radius: 20px;
  padding: 34px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.qi-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-dark);
}

.qi-roundel {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 850;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  flex: none;
}

.qi-logo-row .t { font-weight: 750; font-size: 1.05rem; color: #fff; }
.qi-logo-row .t small { display: block; font-weight: 500; font-size: 0.82rem; color: var(--lav-soft); }

.qi-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.qi-stat .num { font-size: 1.55rem; font-weight: 800; color: #fff; }
.qi-stat .num span { color: #d888e0; }
.qi-stat .label { font-size: 0.85rem; color: var(--lav-soft); }

.qi-stat.wide { grid-column: 1 / -1; }

/* ---------- Process ---------- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
  position: relative;
}

.step { position: relative; }

.step .n {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--purple);
  color: var(--purple);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.step::before {
  content: "";
  position: absolute;
  top: 23px;
  inset-inline-start: 46px;
  inset-inline-end: -26px;
  height: 2px;
  background: var(--line);
}

.step:last-child::before { display: none; }

.step h3 { font-size: 1.02rem; font-weight: 750; color: var(--ink); margin-bottom: 6px; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* ---------- Contact ---------- */

.contact { background: var(--bg-soft); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-content: start;
}

.c-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 22px;
  box-shadow: var(--shadow-1);
}

.c-card .ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--purple-050);
  color: var(--purple);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.c-card h3 { font-size: 0.95rem; font-weight: 720; color: var(--ink); margin-bottom: 4px; }

.c-card p, .c-card a.val { font-size: 0.93rem; color: var(--muted); overflow-wrap: anywhere; }
.c-card a.val { display: block; font-weight: 600; color: var(--purple); }
.c-card a.val:hover { color: var(--purple-700); }
.c-card .dir { direction: ltr; unicode-bidi: embed; }

.contact-panel {
  background: linear-gradient(150deg, #241531 0%, #17121d 100%);
  border-radius: var(--radius);
  color: #fff;
  padding: clamp(30px, 4vw, 46px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-panel h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); font-weight: 800; margin-bottom: 12px; }
.contact-panel p { color: var(--lav); margin-bottom: 28px; max-width: 46ch; }

.contact-panel .row { display: flex; flex-wrap: wrap; gap: 12px; }

.note { margin-top: 18px; font-size: 0.85rem; color: var(--lav-soft); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: var(--lav-soft);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand .mark { width: 52px; height: 40px; margin-bottom: 16px; }

.footer-brand p { font-size: 0.92rem; max-width: 44ch; }

.footer-brand .legal-name { margin-top: 14px; font-size: 0.83rem; color: rgba(205, 188, 216, 0.6); }

.site-footer h4 {
  color: #fff;
  font-size: 0.93rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links { display: grid; gap: 10px; }
.footer-links a { color: var(--lav-soft); font-size: 0.92rem; }
.footer-links a:hover { color: #fff; }

.footer-contact { display: grid; gap: 10px; font-size: 0.92rem; }
.footer-contact .dir { direction: ltr; unicode-bidi: embed; }

.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding-block: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.84rem;
}

.footer-bottom .qi-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lav-soft);
}

.footer-bottom .qi-mini b {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 22px;
  padding-inline: 6px;
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .svc-card { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: block; }

  .main-nav.open {
    display: flex;
    position: absolute;
    top: 72px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(23, 18, 29, 0.98);
    padding: 14px 20px 22px;
    gap: 4px;
    border-bottom: 1px solid var(--line-dark);
  }
  .main-nav.open a { padding: 13px 12px; font-size: 1rem; }
}

@media (max-width: 780px) {
  section { padding-block: 64px; }
  .hero { padding-top: 140px; padding-bottom: 72px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 26px 18px; }
  .about-grid, .qi-grid, .contact-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .step::before { display: none; }
  .nav-cta .btn { display: none; }
}

@media (max-width: 520px) {
  .services-grid, .why-grid, .contact-cards, .qi-stats, .footer-grid,
  .process-grid { grid-template-columns: 1fr; }
  .brand small { display: none; }
  body { font-size: 16px; }
}
