@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&family=IBM+Plex+Sans+Arabic:wght@400;500&display=swap');

/* ---------- Theme tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-panel: #faf7ff;
  --bg-panel-2: #f1e9fb;
  --line: #e6dcf5;
  --cyan: #c026d3;
  --cyan-soft: rgba(192, 38, 211, 0.08);
  --violet: #7c3aed;
  --amber: #d97706;
  --text: #201033;
  --muted: #6b5b8a;
  --header-bg: rgba(255, 255, 255, 0.85);
  --glow-1: rgba(192, 38, 211, 0.09);
  --glow-2: rgba(124, 58, 237, 0.08);
  --glow-3: rgba(217, 119, 6, 0.05);
  --link-stroke: rgba(124, 58, 237, 0.35);
  --card-shadow: 0 4px 18px -8px rgba(124, 58, 237, 0.12);
  --card-shadow-hover: 0 14px 30px -12px rgba(192, 38, 211, 0.25);
  --featured-bg: linear-gradient(180deg, #ffffff, var(--bg-panel-2));
  --hero-shadow: 0 20px 50px -20px rgba(124, 58, 237, 0.25);
  --radius: 14px;
}

[data-theme="dark"] {
  --bg: #14071f;
  --bg-panel: #1f0e38;
  --bg-panel-2: #2b1550;
  --line: #422568;
  --cyan: #c026d3;
  --cyan-soft: rgba(192, 38, 211, 0.18);
  --violet: #7c3aed;
  --amber: #fbbf24;
  --text: #f7f0ff;
  --muted: #b9a3d9;
  --header-bg: rgba(20, 7, 31, 0.85);
  --glow-1: rgba(192, 38, 211, 0.18);
  --glow-2: rgba(124, 58, 237, 0.16);
  --glow-3: rgba(251, 191, 36, 0.08);
  --link-stroke: rgba(192, 38, 211, 0.4);
  --card-shadow: 0 4px 18px -8px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 18px 40px -20px rgba(192, 38, 211, 0.55);
  --featured-bg: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  --hero-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', sans-serif;
  direction: rtl;
  line-height: 1.7;
  transition: background .2s ease, color .2s ease;
}

h1, h2, h3, .display {
  font-family: 'Tajawal', sans-serif;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0;
}

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Background signal texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 85% -5%, var(--glow-1), transparent 60%),
    radial-gradient(560px circle at -5% 30%, var(--glow-2), transparent 55%),
    radial-gradient(420px circle at 60% 105%, var(--glow-3), transparent 55%);
  transition: background .2s ease;
}

.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.foot-brand { display: flex; align-items: center; gap: 8px; }
.foot-brand img { width: 20px; height: 20px; object-fit: contain; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
}
.theme-toggle:hover { border-color: var(--cyan); }
.theme-toggle svg { width: 18px; height: 18px; margin: auto; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 900;
  font-size: 20px;
}

.navlinks { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.navlinks a:hover { color: var(--cyan); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  background: var(--cyan);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.burger svg { width: 20px; height: 20px; }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 10px 24px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-panel);
}
.mobile-menu a {
  padding: 12px 6px;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }

@media (max-width: 820px) {
  .navlinks { display: none; }
  .nav-cta { display: none; }
  .burger { display: flex; }
}
@media (min-width: 821px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  background: var(--cyan-soft);
  border: 1px solid rgba(192,38,211,0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{ opacity: 1; } 50%{ opacity: .3; } }

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.25;
}
.hero h1 .accent { color: var(--cyan); }
.hero p.lead {
  color: var(--muted);
  font-size: 17px;
  margin-top: 20px;
  max-width: 46ch;
}
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--cyan); color: #ffffff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--cyan); }

.stats-row { display: flex; gap: 34px; margin-top: 46px; flex-wrap: wrap; }
.stat .num { font-family: 'Tajawal'; font-weight: 900; font-size: 30px; color: var(--cyan); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* hero visual: network mesh */
.hero-visual {
  position: relative;
  height: 380px;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--hero-shadow);
}
.hero-visual svg { width: 100%; height: 100%; }
.hero-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(192,38,211,0.45));
  pointer-events: none;
}
.node { fill: var(--cyan); }
.node.amber { fill: var(--amber); }
.link { stroke: var(--link-stroke); stroke-width: 1.4; }
.pulse-dot { fill: var(--cyan); animation: travel 3.2s linear infinite; }

@media (max-width: 600px) {
  .hero-visual { height: 260px; }
  .hero-logo { width: 110px; height: 110px; }
}

/* ---------- Gallery (Portfolio / Partners) ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-panel);
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.gallery-shot {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(160deg, var(--bg-panel), var(--bg-panel-2));
  overflow: hidden;
}
.gallery-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-shot .placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 13px; text-align: center; padding: 20px;
}
.gallery-shot .visit-overlay {
  position: absolute; inset: 0;
  background: rgba(20,7,31,0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  font-weight: 700; font-size: 14px;
  opacity: 0;
  transition: opacity .2s ease;
}
.gallery-card:hover .visit-overlay { opacity: 1; }
.gallery-info { padding: 14px 16px; }
.gallery-info h3 { font-size: 15px; }
.gallery-info span { color: var(--muted); font-size: 12.5px; word-break: break-word; }

.hidden { display: none !important; }

/* ---------- Section shell ---------- */
section { padding: 84px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head .eyebrow { display: inline-flex; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin-top: 14px; }
.section-head p { color: var(--muted); margin-top: 12px; }

@media (max-width: 600px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 44px 0 44px; }
  section { padding: 54px 0; }
  .section-head { margin-bottom: 32px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .stats-row { gap: 24px; margin-top: 32px; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.svc-card:hover { transform: translateY(-4px); border-color: rgba(192,38,211,0.45); box-shadow: var(--card-shadow-hover); }
.svc-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cyan-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
  margin-bottom: 16px;
}
.svc-card h3 { font-size: 18px; margin-bottom: 8px; }
.svc-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------- Packages ---------- */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: end;
}
@media (max-width: 980px) { .pkg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pkg-grid { grid-template-columns: 1fr; } }

.pkg-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--card-shadow);
}
.pkg-card.featured {
  border-color: var(--cyan);
  background: var(--featured-bg);
  box-shadow: 0 0 0 1px var(--cyan), var(--card-shadow-hover);
  transform: translateY(-8px);
}
.pkg-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  color: #2b1000;
  background: var(--amber);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.pkg-name { font-size: 17px; font-weight: 700; }
.speedbar-track { height: 6px; background: var(--line); border-radius: 4px; margin: 14px 0 6px; overflow: hidden; }
.speedbar-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--amber)); border-radius: 4px; }
.pkg-speed { color: var(--cyan); font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.pkg-price { font-family: 'Tajawal'; font-weight: 900; font-size: 30px; margin: 6px 0 2px; }
.pkg-price small { font-size: 13px; color: var(--muted); font-weight: 500; }
.pkg-features { list-style: none; padding: 0; margin: 16px 0 22px; flex: 1; }
.pkg-features li { color: var(--muted); font-size: 13.5px; padding: 6px 0; display: flex; gap: 8px; align-items: flex-start; }
.pkg-features li::before { content: "✓"; color: var(--cyan); font-weight: 700; }
.pkg-cta { text-align: center; }

/* ---------- About / mesh strip ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid p { color: var(--muted); font-size: 16px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.contact-card .lbl { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.contact-card .val { color: var(--cyan); font-weight: 700; font-size: 14.5px; word-break: break-word; }
.contact-phone {
  margin-top: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}
.contact-phone b { color: var(--text); font-size: 20px; font-family: 'Tajawal'; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 34px 0; }
.foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13.5px; }
.foot-row a { color: var(--cyan); }

/* skeleton */
.skeleton { opacity: 0.4; }
