/* ===================== Tokens ===================== */
:root {
  --bg:        #0a1024;
  --bg-2:      #0c1330;
  --bg-soft:   #0f1638;
  --card:      #111a3d;
  --card-2:    #131c44;
  --border:    rgba(120, 160, 255, 0.10);
  --border-hover: rgba(56, 189, 248, 0.45);
  --text:      #e7ecff;
  --muted:     #93a0c4;
  --muted-2:   #7a87ad;
  --cyan:      #38d6f0;
  --blue:      #2f7bf6;
  --blue-deep: #1b5cf0;
  --grad:      linear-gradient(90deg, #36e0ef 0%, #2f8df6 55%, #3b6bff 100%);
  --grad-soft: linear-gradient(135deg, rgba(56,214,240,.18), rgba(47,123,246,.18));
  --glow:      0 0 0 1px rgba(56,189,248,.25), 0 18px 50px -20px rgba(47,123,246,.55);
  --radius:    18px;
  --radius-sm: 12px;
  --container: 1200px;
  --ease:      cubic-bezier(.22,.61,.36,1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.en { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* English mode typography */
html.lang-en body { font-family: 'Poppins', 'Cairo', system-ui, sans-serif; }
html.lang-en .hero-title { letter-spacing: -1px; }

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

/* ===================== Animated background ===================== */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(47,123,246,.18), transparent 60%),
    radial-gradient(900px 600px at 10% 10%, rgba(56,214,240,.10), transparent 55%),
    linear-gradient(180deg, #0a1024, #0a1130 40%, #090f24);
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
  animation: float 18s var(--ease) infinite;
}
.orb-1 { width: 420px; height: 420px; top: -80px; right: -60px; background: #1d6ef5; }
.orb-2 { width: 360px; height: 360px; top: 40%; left: -120px; background: #21c3e6; animation-delay: -6s; }
.orb-3 { width: 300px; height: 300px; bottom: -100px; right: 30%; background: #2b53ff; animation-delay: -12s; opacity: .3; }
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,30px) scale(1.08); }
  66%     { transform: translate(-30px,20px) scale(.95); }
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120,160,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

/* ===================== Header ===================== */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  transition: all .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 16, 36, .82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 76px;
  transition: height .35s var(--ease);
}
.site-header.scrolled .header-inner { height: 64px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 58px; width: auto; transition: height .35s var(--ease); }
.site-header.scrolled .brand-logo { height: 48px; }

.nav { display: flex; gap: .35rem; align-items: center; }
.nav-link {
  position: relative;
  padding: .5rem .85rem;
  font-size: .98rem;
  font-weight: 600;
  color: var(--muted);
  border-radius: 10px;
  transition: color .25s, background .25s;
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: .6rem; }
.lang-btn {
  font-family: inherit;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  background: rgba(120,160,255,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .45rem .9rem;
  cursor: pointer;
  transition: all .25s;
}
.lang-btn:hover { border-color: var(--border-hover); background: var(--grad-soft); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.menu-toggle span {
  width: 24px; height: 2.5px; border-radius: 3px; background: var(--text);
  transition: transform .3s var(--ease), opacity .25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: .9rem 1.7rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .3s, background .3s;
  border: 1px solid transparent;
}
.btn svg { transition: transform .3s var(--ease); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 14px 36px -12px rgba(47,123,246,.75);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 48px -12px rgba(47,123,246,.9); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary:hover svg { transform: translateX(-5px); }
.btn-ghost {
  background: rgba(120,160,255,.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--border-hover); background: var(--grad-soft); transform: translateY(-3px); }

/* ===================== Hero ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: 130px 80px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.badge {
  display: inline-block;
  padding: .5rem 1.3rem;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(56,214,240,.08);
  border: 1px solid rgba(56,214,240,.3);
  margin-bottom: 1.8rem;
  animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(56,214,240,.25); }
  50%     { box-shadow: 0 0 0 8px rgba(56,214,240,0); }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 1.4rem;
}
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-2 {
  background: linear-gradient(90deg, #5cdfff, #38d6f0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.22rem);
  margin-bottom: 2rem;
}
.hero-pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 2.5rem;
}
.hero-pills li {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.1rem;
  border-radius: 12px;
  background: rgba(120,160,255,.05);
  border: 1px solid var(--border);
  font-size: .95rem;
  font-weight: 600;
  color: #c8d2f0;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.hero-pills li:hover { transform: translateY(-3px); border-color: var(--border-hover); background: var(--grad-soft); }
.tick { color: var(--cyan); font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ===================== Sections ===================== */
.section { padding-block: 90px; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3.5rem; }
.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  margin-bottom: .9rem;
}
.section-desc { color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); }

.about-text {
  max-width: 880px;
  margin: 0 auto 3.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
}
.about-text p + p { margin-top: 1.2rem; }

/* ===================== Grid + Cards ===================== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(160deg, var(--card), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,0%), rgba(56,189,248,.10), transparent 45%);
  opacity: 0;
  transition: opacity .35s;
  pointer-events: none;
}
.card:hover { transform: translateY(-8px); border-color: var(--border-hover); box-shadow: var(--glow); }
.card:hover::before { opacity: 1; }

.icon-badge {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--cyan);
  background: var(--grad-soft);
  border: 1px solid rgba(56,189,248,.2);
  margin-bottom: 1.3rem;
  transition: transform .35s var(--ease);
}
.icon-badge.lg { width: 62px; height: 62px; }
.icon-badge svg { width: 26px; height: 26px; }
.card:hover .icon-badge { transform: scale(1.12) rotate(-6deg); }

.feature-card h3, .service-card h3, .why-card h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: .6rem; }
.feature-card p, .service-card p, .why-card p { color: var(--muted); font-size: .98rem; }
.feature-card { text-align: center; }
.feature-card .icon-badge { margin-inline: auto; }

/* Work cards */
.work-card { padding: 0; display: flex; flex-direction: column; }
.work-thumb {
  height: 150px;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 50% 130%, rgba(47,123,246,.30), transparent 62%),
    linear-gradient(160deg, #14204f, #0d1430);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.work-thumb::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120,160,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120,160,255,.06) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 75%);
}
.work-ico {
  position: relative;
  z-index: 1;
  width: 78px; height: 78px;
  display: grid; place-items: center;
  border-radius: 20px;
  color: var(--cyan);
  background: var(--grad-soft);
  border: 1px solid rgba(56,189,248,.3);
  box-shadow: 0 10px 30px -12px rgba(47,123,246,.7);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.work-ico svg { width: 38px; height: 38px; }
.work-card:hover .work-ico { transform: scale(1.1) translateY(-4px) rotate(-4deg); box-shadow: 0 16px 36px -12px rgba(47,123,246,.9); }
.work-body { padding: 1.6rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.work-body h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: .6rem; }
.work-body p { color: var(--muted); font-size: .95rem; margin-bottom: 1.1rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags span {
  font-size: .82rem; font-weight: 600;
  padding: .35rem .8rem;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(56,214,240,.08);
  border: 1px solid rgba(56,214,240,.22);
}

/* Testimonials */
.testimonial { display: flex; flex-direction: column; }
.quote { font-size: 3.5rem; line-height: .4; color: rgba(56,214,240,.35); font-family: Georgia, serif; align-self: flex-start; }
.quote-text { color: #d6deff; font-size: 1.05rem; margin: 1.2rem 0; flex: 1; }
.t-author {
  display: flex; align-items: center; gap: .8rem;
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
  color: var(--muted);
  font-weight: 600;
}
.avatar {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff; font-weight: 800;
  flex-shrink: 0;
}

/* Contact cards */
.contact-card { text-align: center; align-items: center; display: flex; flex-direction: column; }
.contact-card .icon-badge { margin-inline: auto; }
.contact-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: .4rem; }
.contact-val { color: var(--muted); font-size: .92rem; direction: ltr; }
.contact-card.highlight { border-color: rgba(56,214,240,.4); background: linear-gradient(160deg, #122a4a, #0d1838); }

/* ===================== CTA ===================== */
.cta-section { padding-block: 90px; }
.cta-inner {
  text-align: center;
  border-radius: 28px;
  padding: 4rem 2rem;
  background:
    radial-gradient(700px circle at 50% 0%, rgba(47,123,246,.22), transparent 60%),
    linear-gradient(160deg, #0f1c43, #0b1330);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cta-inner h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 900; margin-bottom: 1rem; }
.cta-inner p { color: var(--muted); max-width: 640px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* ===================== Footer ===================== */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; margin-top: 40px; }
.footer-inner { text-align: center; color: var(--muted-2); font-size: .95rem; }

/* ===================== Back to top ===================== */
.to-top {
  position: fixed;
  inset-block-end: 26px;
  inset-inline-start: 26px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 30px -10px rgba(47,123,246,.8);
  opacity: 0;
  transform: translateY(20px) scale(.8);
  pointer-events: none;
  transition: all .35s var(--ease);
  z-index: 90;
}
.to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.to-top:hover { transform: translateY(-4px); }

/* ===================== Reveal animation ===================== */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
/* stagger inside grids */
.grid .reveal:nth-child(2) { transition-delay: .08s; }
.grid .reveal:nth-child(3) { transition-delay: .16s; }
.grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ===================== Custom cursor (desktop) ===================== */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  margin-left: -4px; margin-top: -4px;
  will-change: transform;
  transition: opacity .3s;
}
.cursor-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(56,214,240,.9);
}
.cursor-ring {
  width: 38px; height: 38px;
  margin-left: -19px; margin-top: -19px;
  border: 2px solid rgba(56,214,240,.55);
  transition: opacity .3s, width .25s var(--ease), height .25s var(--ease),
              margin .25s var(--ease), background .25s, border-color .25s;
}
.cursor-dot.on, .cursor-ring.on { opacity: 1; }
.cursor-ring.hover {
  width: 64px; height: 64px;
  margin-left: -32px; margin-top: -32px;
  background: rgba(56,214,240,.10);
  border-color: rgba(56,214,240,.85);
}
.cursor-ring.down { width: 28px; height: 28px; margin-left: -14px; margin-top: -14px; }
/* Hide native cursor only when the custom one is active */
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .card { cursor: none; }
/* The custom cursor elements only exist where a fine pointer is present */
@media (pointer: coarse), (hover: none) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ===================== Responsive ===================== */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .menu-toggle { display: flex; }
  .header-inner { height: 72px; }
  .nav {
    position: fixed;
    inset-block-start: 72px;
    inset-inline: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10,16,36,.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: .8rem 5% 1.2rem;
    transform: translateY(-130%);
    transition: transform .4s var(--ease);
    z-index: 95;
  }
  .site-header.scrolled .nav { inset-block-start: 64px; }
  .nav.open { transform: translateY(0); }
  .nav-link { width: 100%; padding: .9rem 1rem; text-align: start; }
  .nav-link::after { display: none; }
  .brand-logo { height: 50px; }
  .site-header.scrolled .brand-logo { height: 44px; }
}
@media (max-width: 640px) {
  .container { width: 90%; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: 60px; }
  .section-head { margin-bottom: 2.4rem; }
  .hero { min-height: auto; padding-block: 120px 56px; }
  .hero-pills { gap: .6rem; }
  .hero-pills li { width: 100%; justify-content: flex-start; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { width: 100%; flex-direction: column; }
  .card { padding: 1.6rem 1.4rem; }
  .work-thumb { height: 160px; }
  .work-emoji { font-size: 3.2rem; }
  .cta-inner { padding: 2.8rem 1.4rem; border-radius: 22px; }
  .brand-logo { height: 46px; }
  .to-top { inset-block-end: 18px; inset-inline-start: 18px; width: 44px; height: 44px; }
}
@media (max-width: 380px) {
  .brand-logo { height: 40px; }
  .lang-btn { padding: .4rem .7rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
