/* =========================================================
   Zaffer Tec — ملف التنسيق الرئيسي
   غيّر الألوان والخطوط من المتغيرات تحت (:root) وبتتغير بكل الموقع
   ========================================================= */

:root {
  /* الألوان */
  --ink: #0B1F3A;          /* الخلفية الغامقة */
  --ink-2: #13294A;        /* بطاقات على الخلفية الغامقة */
  --ink-line: #26406A;     /* حدود على الغامق */
  --ground: #F4F5F0;       /* خلفية الصفحة الفاتحة */
  --card: #FFFFFF;
  --line: #DEE2DA;
  --text: #0B1F3A;
  --muted: #4D5852;
  --muted-dark: #B9C1BA;   /* نص ثانوي على الغامق */
  --accent: #10A4B7;       /* تركوازي الهوية */
  --brand: #0B6E7C;        /* تركوازي غامق للنصوص على الفاتح */

  /* الخطوط */
  --font: 'IBM Plex Sans Arabic', sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* المقاسات */
  --container: 1280px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--ground);
  line-height: 1.6;
}
a { color: var(--brand); }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: .5px;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
.mono.on-dark { color: var(--accent); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); opacity: .92; }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ground); border: 1px solid #34507E; font-weight: 500; }
.btn-dark { background: var(--ink); color: var(--ground); }
.btn-light { background: var(--ground); color: var(--brand); }
.btn-lg { padding: 16px 28px; font-size: 17px; }

/* ---------- القائمة العلوية ---------- */
.site-header { background: var(--ink); color: var(--ground); position: sticky; top: 0; z-index: 50; }
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--ground); text-decoration: none; }
.logo-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--ink-2); border: 1px solid var(--ink-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.logo-icon img { width: 32px; height: 32px; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { font-size: 20px; }
.logo-img { height: 34px; width: auto; display: block; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-logo { height: 24px; width: auto; }
.logo-text small { font-family: var(--mono); font-size: 12px; color: #9AA59E; letter-spacing: 1px; }

.nav-links { display: flex; gap: 22px; flex: 1; }
.nav-links a { color: #D5DAD2; text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--accent); }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.lang-toggle {
  background: none; border: 0; color: #D5DAD2; cursor: pointer;
  font-family: var(--mono); font-size: 14px; padding: 12px 10px;
}
.menu-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 8px;
  border: 1px solid var(--ink-line); background: transparent; color: var(--ground);
  cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- الواجهة (Hero) ---------- */
.hero { background: var(--ink); color: var(--ground); padding: 72px 0 112px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.hero-text { flex: 1 1 540px; display: flex; flex-direction: column; gap: 24px; }
.hero-text h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.3; }
.hero-text p { font-size: 19px; line-height: 1.8; color: var(--muted-dark); max-width: 580px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.terminal {
  flex: 1 1 440px;
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  overflow: hidden;
  direction: ltr;
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--ink-line); }
.terminal-bar .dot { width: 12px; height: 12px; border-radius: 50%; background: #34507E; }
.terminal-bar .title { font-family: var(--mono); font-size: 13px; color: #9AA59E; margin-left: 12px; }
.terminal pre {
  margin: 0; padding: 24px;
  font-family: var(--mono); font-size: 14px; line-height: 2;
  color: #D5DAD2; white-space: pre-wrap; min-height: 280px;
}
.t-muted { color: #9AA59E; }
.t-accent { color: var(--accent); }
.t-warn { color: #F2B66D; }

/* ---------- الخدمات الأساسية ---------- */
.core { margin-top: -56px; }
.core-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.core-card { display: flex; flex-direction: column; gap: 14px; }
.core-card h2 { font-size: 24px; }
.core-card p { color: var(--muted); line-height: 1.8; }
.core-card ul { margin: 4px 0 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }

/* ---------- عنوان الأقسام ---------- */
.section { padding: 96px 0 40px; }
.section-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 32px;
}
.section-head h2 { margin-top: 8px; font-size: clamp(28px, 3.5vw, 38px); }
.section-head p { color: var(--muted); max-width: 460px; line-height: 1.8; }

/* ---------- كل الخدمات ---------- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.service {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; display: flex; gap: 16px; align-items: flex-start;
  text-decoration: none; color: var(--text);
  transition: border-color .15s;
}
.service:hover { border-color: var(--brand); }
.service-code {
  flex: 0 0 44px; height: 44px; border-radius: 10px;
  background: var(--ink); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 14px;
}
.service strong { display: block; font-size: 18px; margin-bottom: 6px; }
.service span.desc { color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ---------- طريقة الشغل ---------- */
.process-box { background: var(--ink); color: var(--ground); border-radius: 16px; padding: 48px; }
.process-box h2 { margin: 8px 0 36px; font-size: 34px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step {
  background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 12px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.step .num { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--accent); }
.step strong { font-size: 19px; }
.step span { color: var(--muted-dark); line-height: 1.7; font-size: 15px; }

/* ---------- الأكاديمية والفريق ---------- */
.split { display: flex; flex-wrap: wrap; gap: 24px; padding: 40px 24px; }
.academy {
  flex: 1 1 440px; background: var(--brand); color: var(--ground);
  border-radius: var(--radius); padding: 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.academy h2 { font-size: 30px; }
.academy p { color: #DCEDE5; line-height: 1.8; }
.academy .mono { color: #CFE6DC; font-weight: 500; }
.academy .btn { align-self: flex-start; margin-top: 8px; }

.team { flex: 1 1 560px; display: flex; flex-direction: column; gap: 20px; padding: 40px; }
.team h2 { font-size: 30px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.member { display: flex; flex-direction: column; gap: 8px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--line); object-fit: cover; }
.member strong { font-size: 17px; }
.member span { font-size: 14px; color: var(--muted); }

/* ---------- التواصل ---------- */
.contact { padding: 40px 0 96px; }
.contact-box { display: flex; flex-wrap: wrap; gap: 40px; padding: 48px; border-radius: 16px; }
.contact-info { flex: 1 1 360px; display: flex; flex-direction: column; gap: 14px; }
.contact-info h2 { font-size: 34px; }
.contact-info p { color: var(--muted); line-height: 1.8; font-size: 17px; }
.contact-info .details { color: var(--muted); }

.contact-form { flex: 1 1 480px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.contact-form .full { grid-column: 1 / -1; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  min-height: 48px; padding: 0 14px; border-radius: 10px;
  border: 1px solid #C9CFC6; font-family: inherit; font-size: 16px; background: #fff;
}
.contact-form textarea { padding: 12px 14px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.form-msg { grid-column: 1 / -1; margin: 0; font-weight: 600; color: var(--brand); display: none; }
.form-msg.show { display: block; }

/* ---------- الفوتر ---------- */
.site-footer { background: var(--ink); color: var(--muted-dark); }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
  padding-top: 40px; padding-bottom: 40px; font-size: 15px;
}
.footer-inner strong { color: var(--ground); }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: #D5DAD2; }

/* ---------- الموبايل ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav { flex-wrap: wrap; }
  .nav-links {
    display: none; order: 3; flex-basis: 100%;
    flex-direction: column; gap: 4px; padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; }
  .nav-actions .btn { display: none; }
  .process-box, .contact-box, .academy, .team { padding: 28px; }
  .contact-form { grid-template-columns: 1fr; }
}


/* =========================================================
   طبقة الحركة (Motion layer)
   دمج ستايل UniNet (هيرو غامق + شبكة متحركة + كروت عايمة + ناف زجاجي)
   مع تفاعلات Zaffeer (ترمنال، سبوت لايت، كروت بتطلع مع السكرول)
   ========================================================= */
:root { --glow: rgba(16,164,183,.38); --blue: #4C8DFF; --dir: 1; --ease: cubic-bezier(.2,.7,.2,1); }
[dir="rtl"] { --dir: -1; }
html { scroll-padding-top: 96px; }

/* شريط تقدّم السكرول */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  box-shadow: 0 0 12px var(--glow);
}
[dir="rtl"] .scroll-progress { transform-origin: right; }

/* ---------- القائمة: كبسولة زجاجية عايمة ---------- */
.site-header { position: fixed; top: 12px; left: 0; right: 0; background: transparent; padding: 0 16px; pointer-events: none; }
.site-header .nav {
  pointer-events: auto; max-width: 1120px; padding: 10px 14px; padding-inline-start: 22px;
  border-radius: 999px; background: rgba(19,41,74,.45);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 40px -12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  transition: background .3s, padding .3s, box-shadow .3s;
}
.site-header.scrolled .nav { background: rgba(8,22,44,.82); padding-top: 7px; padding-bottom: 7px; }
.nav-links a { position: relative; transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- الأزرار ---------- */
.btn { position: relative; overflow: hidden; border-radius: 999px; transition: transform .25s var(--ease), box-shadow .25s, opacity .15s, background .25s; }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60%; left: -80%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.38), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease); pointer-events: none;
}
.btn:hover::after { left: 130%; }
.btn:hover { transform: translateY(-2px); }
.btn-accent { box-shadow: 0 8px 26px -8px rgba(16,164,183,.7); }
.hero .btn-accent { animation: btnPulse 2.8s ease-out infinite; }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: var(--accent); }
@keyframes btnPulse {
  0%   { box-shadow: 0 8px 26px -8px rgba(16,164,183,.7), 0 0 0 0 rgba(16,164,183,.45); }
  70%  { box-shadow: 0 8px 26px -8px rgba(16,164,183,.7), 0 0 0 16px rgba(16,164,183,0); }
  100% { box-shadow: 0 8px 26px -8px rgba(16,164,183,.7), 0 0 0 0 rgba(16,164,183,0); }
}

/* ---------- الهيرو ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate; padding: 150px 0 136px;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(40,100,220,.30), transparent 60%),
    radial-gradient(700px 520px at 92% 85%, rgba(16,164,183,.20), transparent 60%),
    linear-gradient(180deg, #06122a 0%, var(--ink) 100%);
}
.hero > .container { position: relative; z-index: 1; }
.hero::before {
  content: ""; position: absolute; z-index: 0; width: 540px; height: 540px; border-radius: 50%;
  top: -180px; inset-inline-start: -140px; filter: blur(24px);
  background: radial-gradient(circle, rgba(16,164,183,.26), transparent 65%);
  animation: orbDrift 30s ease-in-out infinite alternate;
}
@keyframes orbDrift { to { transform: translate(120px, 80px) scale(1.2); } }

.net-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.net-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .net-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(120,170,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(120,170,255,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 35%, #000 15%, transparent 75%);
  animation: gridDrift 60s linear infinite;
}
@keyframes gridDrift { to { background-position: 56px 56px; } }

/* دخول عناصر الهيرو */
.hero-text > .mono, .hero-text > p, .hero-text > .hero-buttons { opacity: 0; animation: fadeUp .8s var(--ease) forwards; }
.hero-text > .mono { animation-delay: .05s; }
.hero-text > p { animation-delay: .75s; }
.hero-text > .hero-buttons { animation-delay: .95s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.hero-text h1 { letter-spacing: -.5px; }
.hero-text h1 .w {
  display: inline-block; opacity: 0; transform: translateY(26px); filter: blur(8px);
  animation: wordIn .85s var(--ease) forwards; animation-delay: calc(.2s + var(--i, 0) * .07s);
}
.hero-text h1 .grad {
  background: linear-gradient(90deg, #7ff0ff, #8fb4ff 60%, #c7d4f0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes wordIn { to { opacity: 1; transform: none; filter: blur(0); } }

.hero-visual {
  position: relative; flex: 1 1 440px; padding: 34px 0 44px;
  opacity: 0; animation: slideIn 1s var(--ease) .35s forwards;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(calc(var(--dir) * 48px)); } to { opacity: 1; transform: none; } }

/* الترمنال زجاجي */
.terminal {
  position: relative; flex: none; width: 100%;
  background: rgba(13,32,60,.72); border: 1px solid rgba(120,170,255,.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px -24px rgba(0,0,0,.65), 0 0 70px -24px var(--glow);
}
.terminal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--accent), var(--blue), transparent);
  background-size: 200% 100%; animation: sweep 4s linear infinite;
}
@keyframes sweep { to { background-position: -200% 0; } }
.terminal::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(16,164,183,.07), transparent);
  animation: scan 6s linear infinite;
}
@keyframes scan { from { transform: translateY(-100px); } to { transform: translateY(420px); } }
.terminal-bar .dot:nth-child(1) { background: #ff5f57; opacity: .85; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; opacity: .85; }
.terminal-bar .dot:nth-child(3) { background: #28c840; opacity: .85; }
.hero-visual .terminal pre { min-height: 330px; padding-bottom: 112px; }
.terminal pre .line { transition: opacity .35s, transform .35s var(--ease); }
.terminal pre .line.hide { opacity: 0; transform: translateX(-8px); }
.terminal .t-accent { text-shadow: 0 0 12px rgba(16,164,183,.55); }
.cursor {
  display: inline-block; width: 8px; height: 1.05em; background: var(--accent);
  vertical-align: text-bottom; margin-inline-start: 3px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* كروت عايمة فوق الترمنال */
.float-card {
  position: absolute; z-index: 3; width: 214px; padding: 14px 16px; direction: ltr; text-align: start;
  font-family: var(--mono); font-size: 11.5px; color: #D5DAD2;
  background: rgba(14,34,66,.72); border: 1px solid rgba(120,170,255,.28); border-radius: 14px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.7), 0 0 40px -18px var(--glow);
  animation: floaty 6s ease-in-out infinite;
}
[dir="rtl"] .float-card { direction: rtl; }
.float-card.fc-a { top: 0; right: -14px; }
.float-card.fc-b { bottom: 0; left: -22px; width: 252px; animation-duration: 7.5s; animation-delay: -2.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.fc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: #9FB3D6; font-size: 11px; }
.fc-badge { padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .5px; color: #3EE6A0; background: rgba(62,230,160,.12); border: 1px solid rgba(62,230,160,.3); }
.fc-badge.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-inline-end: 6px; animation: blink 1.2s steps(1) infinite; }
.fc-badge.blue { color: #8fb4ff; background: rgba(76,141,255,.14); border-color: rgba(76,141,255,.35); }
.fc-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid rgba(120,170,255,.12); }
.fc-row span:first-child { color: #8294B5; }
.fc-row b { color: #fff; font-weight: 700; }
.fc-bar { height: 4px; border-radius: 4px; background: rgba(120,170,255,.16); overflow: hidden; margin-top: 8px; }
.fc-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--blue)); transition: width .5s var(--ease); box-shadow: 0 0 10px var(--glow); }
.fc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.fc-chips span { padding: 3px 9px; border-radius: 999px; font-size: 10.5px; color: #cfe3ff; background: rgba(76,141,255,.14); border: 1px solid rgba(76,141,255,.3); }

/* ---------- الكروت: سبوت لايت + رفع ---------- */
.core-card, .service, .step, .team { position: relative; }
.core-card { overflow: hidden; }
.core-card::before, .service::before, .step::before, .team::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(16,164,183,.15), transparent 60%);
}
.core-card:hover::before, .service:hover::before, .step:hover::before, .team:hover::before { opacity: 1; }

.core-card { box-shadow: 0 24px 50px -28px rgba(11,31,58,.35); transition: transform .35s var(--ease), box-shadow .35s, border-color .25s; }
.core-card::after {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--blue));
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
[dir="rtl"] .core-card::after { transform-origin: right; }
.core-card:hover { border-color: rgba(16,164,183,.5); box-shadow: 0 30px 60px -24px rgba(11,31,58,.45), 0 0 40px -18px var(--glow); }
.core-card:hover::after { transform: scaleX(1); }
.core-card .mono { transition: letter-spacing .3s; }
.core-card:hover .mono { letter-spacing: 1.5px; }

.service { transition: transform .35s var(--ease), border-color .25s, box-shadow .35s; }
.service:hover { box-shadow: 0 20px 40px -20px rgba(11,31,58,.35); }
.service-code { transition: background .3s, color .3s, transform .4s var(--ease), box-shadow .3s; }
.service:hover .service-code { background: var(--accent); color: var(--ink); transform: rotate(-6deg) scale(1.1); box-shadow: 0 0 24px var(--glow); }

/* ---------- طريقة الشغل ---------- */
.process-box { position: relative; overflow: hidden; isolation: isolate; background: linear-gradient(160deg, #0a2447, var(--ink) 55%, #08182f); }
.process-box > *:not(.net-bg) { position: relative; z-index: 1; }
.step { transition: transform .35s var(--ease), border-color .25s, background .25s; background: rgba(19,41,74,.7); }
.step:hover { border-color: var(--accent); }
.step .num { text-shadow: 0 0 18px rgba(16,164,183,.6); }
@media (min-width: 1100px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 44px; inset-inline-start: 100%; width: 20px; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--blue)); transform: scaleX(0); transform-origin: left;
    transition: transform .6s var(--ease) .5s;
  }
  [dir="rtl"] .step:not(:last-child)::after { transform-origin: right; }
  .step.in:not(:last-child)::after { transform: scaleX(1); }
}

/* ---------- الأكاديمية والفريق ---------- */
.academy {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--brand), #0d8b9b, #0a5a66, var(--brand)); background-size: 300% 300%;
  animation: gradShift 12s ease infinite;
}
.academy::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; inset-inline-end: -90px; top: -90px;
  background: radial-gradient(circle, rgba(255,255,255,.2), transparent 65%); animation: orbDrift 10s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes gradShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.avatar { transition: transform .35s var(--ease), box-shadow .3s; }
.member:hover .avatar { transform: scale(1.1) rotate(-3deg); box-shadow: 0 0 0 3px var(--accent), 0 0 24px var(--glow); }

/* ---------- التواصل ---------- */
.contact-form input, .contact-form select, .contact-form textarea { transition: box-shadow .25s, border-color .25s; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(16,164,183,.18); }
.contact-box { box-shadow: 0 30px 70px -40px rgba(11,31,58,.4); }

/* ---------- ظهور العناصر مع السكرول ---------- */
.reveal { transition: opacity .8s var(--ease) var(--d, 0s), transform .8s var(--ease) var(--d, 0s), box-shadow .35s, border-color .25s; }
.reveal:not(.in) { opacity: 0; transform: translateY(30px); }
.reveal.settled { transition: transform .35s var(--ease), box-shadow .35s, border-color .25s, background .25s, opacity .3s; }

/* ---------- موبايل ---------- */
@media (max-width: 900px) {
  .site-header .nav { border-radius: 26px; padding-inline-start: 16px; }
  .hero { padding: 120px 0 112px; }
}
@media (max-width: 700px) {
  .hero-visual { padding: 0; display: flex; flex-direction: column; gap: 14px; }
  .float-card { position: relative; inset: auto !important; width: 100% !important; animation: none; }
  .float-card.fc-b { display: none; }
  .hero-visual .terminal pre { min-height: 280px; padding-bottom: 24px; }
}

/* ---------- لمن المستخدم يفضّل حركة أقل ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero-text > .mono, .hero-text > p, .hero-text > .hero-buttons, .hero-visual, .hero-text h1 .w { opacity: 1; transform: none; filter: none; }
  .reveal:not(.in) { opacity: 1; transform: none; }
}


/* =========================================================
   الثيم الأبيض (Light theme) + حركة سلسة
   ========================================================= */
html.smooth { scroll-behavior: auto; }
.tilting { transition: box-shadow .35s, border-color .25s, background .25s !important; will-change: transform; }

/* القائمة */
.site-header .nav { background: rgba(255,255,255,.72); border-color: rgba(11,31,58,.10); box-shadow: 0 10px 40px -16px rgba(11,31,58,.25), inset 0 1px 0 rgba(255,255,255,.9); }
.site-header.scrolled .nav { background: rgba(255,255,255,.92); }
.logo { color: var(--ink); }
.logo-img { height: 40px; }
.nav-links a, .lang-toggle { color: #2a3b55; }
.nav-links a:hover, .lang-toggle:hover { color: var(--brand); }
.menu-toggle { color: var(--ink); border-color: rgba(11,31,58,.18); }

/* الهيرو */
.hero {
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(76,141,255,.16), transparent 60%),
    radial-gradient(700px 520px at 92% 85%, rgba(16,164,183,.16), transparent 60%),
    linear-gradient(180deg, #eef5ff 0%, #f7fafc 60%, var(--ground) 100%);
}
.hero::before { background: radial-gradient(circle, rgba(16,164,183,.22), transparent 65%); }
.hero .net-bg::before { background-image: linear-gradient(rgba(11,31,58,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(11,31,58,.06) 1px, transparent 1px); }
.mono.on-dark { color: var(--brand); }
.hero-text h1 { color: var(--ink); }
.hero-text h1 .grad { background: linear-gradient(90deg, #0B6E7C, #2f6fe0 70%, #5a7bd6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-text p { color: var(--muted); }
.btn-ghost { color: var(--ink); border-color: rgba(11,31,58,.22); background: rgba(255,255,255,.6); }
.btn-ghost:hover { background: #fff; border-color: var(--brand); }
.btn-accent { color: #fff; background: var(--brand); box-shadow: 0 10px 26px -10px rgba(11,110,124,.7); }
@keyframes btnPulse {
  0%   { box-shadow: 0 10px 26px -10px rgba(11,110,124,.7), 0 0 0 0 rgba(16,164,183,.4); }
  70%  { box-shadow: 0 10px 26px -10px rgba(11,110,124,.7), 0 0 0 16px rgba(16,164,183,0); }
  100% { box-shadow: 0 10px 26px -10px rgba(11,110,124,.7), 0 0 0 0 rgba(16,164,183,0); }
}

/* الترمنال يضل غامق (تباين حلو على الأبيض)، والكروت العايمة فاتحة */
.terminal { box-shadow: 0 34px 70px -28px rgba(11,31,58,.55), 0 0 60px -30px var(--glow); background: rgba(11,31,58,.94); }
.float-card { color: #3a4a66; background: rgba(255,255,255,.82); border-color: rgba(11,31,58,.10); box-shadow: 0 24px 50px -22px rgba(11,31,58,.35); }
.fc-head { color: #5b6b86; }
.fc-row { border-top-color: rgba(11,31,58,.08); }
.fc-row span:first-child { color: #7a879b; }
.fc-row b { color: var(--ink); }
.fc-bar { background: rgba(11,31,58,.08); }
.fc-badge { color: #0f9d6b; background: rgba(15,157,107,.10); border-color: rgba(15,157,107,.3); }
.fc-badge.blue { color: #2f6fe0; background: rgba(47,111,224,.10); border-color: rgba(47,111,224,.3); }
.fc-chips span { color: #2f4a7a; background: rgba(47,111,224,.08); border-color: rgba(47,111,224,.25); }

/* طريقة الشغل: فاتح */
.process-box { background: linear-gradient(160deg, #ffffff, #f1f7fb); border: 1px solid var(--line); color: var(--ink); box-shadow: 0 30px 70px -45px rgba(11,31,58,.35); }
.process-box .mono.on-dark { color: var(--brand); }
.step { background: rgba(255,255,255,.85); border-color: var(--line); }
.step .num { color: var(--brand); text-shadow: none; }
.step span { color: var(--muted); }
.step:hover { border-color: var(--accent); background: #fff; }
.step:hover { box-shadow: 0 22px 40px -22px rgba(11,31,58,.3); }
.step::before { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(16,164,183,.12), transparent 60%); }

/* الفوتر: فاتح */
.site-footer { background: #fff; color: var(--muted); border-top: 1px solid var(--line); }
.footer-inner strong { color: var(--ink); }
.footer-links a { color: var(--ink); }
.footer-links a:hover { color: var(--brand); }
.footer-logo { height: 30px; }


/* =========================================================
   الخلفية الحيّة (Live background)
   ========================================================= */
.live-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #f1f6fc 0%, var(--ground) 55%, #eef5f4 100%); }
.live-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(11,31,58,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(11,31,58,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse at 50% 30%, #000 10%, transparent 80%);
  animation: gridDrift 26s linear infinite;
}
.live-bg .blob {
  position: absolute; width: 640px; height: 640px; will-change: transform;
  transform: translate3d(calc(var(--px, 0) * var(--k) * 70px), calc((var(--py, 0) * 50px + var(--sy, 0) * 1px) * var(--k)), 0);
}
.live-bg .blob i { display: block; width: 100%; height: 100%; border-radius: 50%; animation: blobFloat 18s ease-in-out infinite alternate; }
.live-bg .b1 { top: -200px; left: -160px; }
.live-bg .b1 i { background: radial-gradient(circle, rgba(16,164,183,.34), transparent 68%); }
.live-bg .b2 { top: 18vh; right: -220px; width: 720px; height: 720px; }
.live-bg .b2 i { background: radial-gradient(circle, rgba(76,141,255,.28), transparent 68%); animation-duration: 22s; animation-delay: -6s; }
.live-bg .b3 { bottom: -260px; left: 25%; width: 700px; height: 700px; }
.live-bg .b3 i { background: radial-gradient(circle, rgba(150,120,255,.18), transparent 68%); animation-duration: 26s; animation-delay: -12s; }
@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(90px, 60px) scale(1.15); }
  100% { transform: translate(-70px, 110px) scale(.95); }
}
.live-bg .glow {
  position: absolute; top: 0; left: 0; width: 600px; height: 600px; border-radius: 50%; will-change: transform;
  background: radial-gradient(circle, rgba(16,164,183,.16), transparent 62%);
}
/* الخلفية الحيّة محصورة بالهيرو بس */
.hero .live-bg { position: absolute; z-index: 0; background: none; }
.hero .live-bg::before { display: none; }
.hero {
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(76,141,255,.16), transparent 60%),
    radial-gradient(700px 520px at 92% 85%, rgba(16,164,183,.16), transparent 60%),
    linear-gradient(180deg, #eef5ff 0%, #f7fafc 60%, var(--ground) 100%);
}



/* ---------- هيرو حيّ أكثر: بقع أسرع + موجة أورورا ---------- */
.hero .live-bg .b1 i { background: radial-gradient(circle, rgba(16,164,183,.45), transparent 66%); animation: blobLive1 32s ease-in-out infinite alternate; }
.hero .live-bg .b2 i { background: radial-gradient(circle, rgba(76,141,255,.40), transparent 66%); animation: blobLive2 38s ease-in-out infinite alternate; }
.hero .live-bg .b3 { bottom: -320px; }
.hero .live-bg .b3 i { background: radial-gradient(circle, rgba(150,120,255,.30), transparent 66%); animation: blobLive3 44s ease-in-out infinite alternate; }
@keyframes blobLive1 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(260px,120px) scale(1.25); } 100% { transform: translate(120px,260px) scale(.9); } }
@keyframes blobLive2 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-280px,100px) scale(1.2); } 100% { transform: translate(-120px,-120px) scale(1.05); } }
@keyframes blobLive3 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-220px,-160px) scale(1.3); } 100% { transform: translate(240px,-80px) scale(.95); } }

/* موجة أورورا بتلف ببطء ورا المحتوى */
.hero .live-bg::after {
  content: ""; position: absolute; left: -25%; top: -60%; width: 150%; height: 160%;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(16,164,183,0) 0deg, rgba(16,164,183,.22) 60deg, rgba(76,141,255,0) 120deg,
    rgba(76,141,255,.20) 200deg, rgba(150,120,255,0) 260deg, rgba(16,164,183,.18) 320deg, rgba(16,164,183,0) 360deg);
  filter: blur(60px); opacity: .9;
  animation: auroraSpin 70s linear infinite;
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }
.hero .live-bg .glow { background: radial-gradient(circle, rgba(16,164,183,.26), transparent 62%); }

/* خلفية الهيرو بتضل حيّة حتى لو "تأثيرات الحركة" مطفية بالويندوز */
@media (prefers-reduced-motion: reduce) {
  .hero .live-bg::after { animation: auroraSpin 70s linear infinite !important; }
  .hero .live-bg .b1 i { animation: blobLive1 32s ease-in-out infinite alternate !important; }
  .hero .live-bg .b2 i { animation: blobLive2 38s ease-in-out infinite alternate !important; }
  .hero .live-bg .b3 i { animation: blobLive3 44s ease-in-out infinite alternate !important; }
  .hero .net-bg::before { animation: gridDrift 60s linear infinite !important; }
  .hero::before { animation: orbDrift 30s ease-in-out infinite alternate !important; }
}


/* =========================================================
   ألوان أكثر للأقسام اللي تحت الهيرو
   كل عنصر بياخد زوج ألوان (--c1 → --c2)
   ========================================================= */
:root {
  --teal-1: #10A4B7; --teal-2: #0B6E7C;
  --blue-1: #4C8DFF; --blue-2: #2457D6;
  --violet-1: #9B7BFF; --violet-2: #6A45E0;
  --pink-1: #FF7AB6; --pink-2: #D9407F;
  --amber-1: #FFB547; --amber-2: #E07B12;
  --green-1: #34D399; --green-2: #0E9F6E;
}

/* خلفيات أقسام ملوّنة خفيفة */
#services { background:
  radial-gradient(600px 380px at 8% 20%, rgba(76,141,255,.10), transparent 70%),
  radial-gradient(600px 380px at 95% 80%, rgba(155,123,255,.10), transparent 70%); }
#process { background: radial-gradient(700px 400px at 50% 60%, rgba(16,164,183,.10), transparent 70%); }
.contact { background:
  radial-gradient(600px 400px at 10% 50%, rgba(255,122,182,.09), transparent 70%),
  radial-gradient(600px 400px at 90% 40%, rgba(255,181,71,.10), transparent 70%); }

/* عناوين الأقسام بتدرّج */
.section-head h2, .process-box h2, .team h2, .contact-info h2 {
  background: linear-gradient(90deg, var(--ink) 0%, var(--teal-2) 45%, var(--blue-2) 75%, var(--violet-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[dir="rtl"] .section-head h2, [dir="rtl"] .process-box h2, [dir="rtl"] .team h2, [dir="rtl"] .contact-info h2 {
  background-image: linear-gradient(270deg, var(--ink) 0%, var(--teal-2) 45%, var(--blue-2) 75%, var(--violet-2) 100%);
}

/* الكروت الأساسية: كل كرت لون */
.core-card:nth-child(1) { --c1: var(--teal-1);   --c2: var(--teal-2); }
.core-card:nth-child(2) { --c1: var(--blue-1);   --c2: var(--blue-2); }
.core-card:nth-child(3) { --c1: var(--violet-1); --c2: var(--violet-2); }
.core-card {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 9%, #fff) 0%, #fff 55%);
  border-color: color-mix(in srgb, var(--c1) 25%, var(--line));
}
.core-card::after { transform: scaleX(1); height: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.core-card .mono { color: var(--c2); }
.core-card li::marker { color: var(--c1); }
.core-card:hover { border-color: var(--c1); box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--c2) 45%, transparent); }
.core-card::before { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c1) 18%, transparent), transparent 60%); }

/* الخدمات: كل أيقونة بتدرّج مختلف */
.service:nth-child(1) { --c1: var(--teal-1);   --c2: var(--teal-2); }
.service:nth-child(2) { --c1: var(--blue-1);   --c2: var(--blue-2); }
.service:nth-child(3) { --c1: var(--violet-1); --c2: var(--violet-2); }
.service:nth-child(4) { --c1: var(--pink-1);   --c2: var(--pink-2); }
.service:nth-child(5) { --c1: var(--amber-1);  --c2: var(--amber-2); }
.service:nth-child(6) { --c1: var(--green-1);  --c2: var(--green-2); }
.service-code { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; box-shadow: 0 8px 18px -8px var(--c2); }
.service { border-inline-start: 3px solid var(--c1); }
.service:hover { border-color: var(--c1); box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--c2) 50%, transparent); }
.service:hover .service-code { background: linear-gradient(135deg, var(--c2), var(--c1)); color: #fff; box-shadow: 0 0 24px color-mix(in srgb, var(--c1) 60%, transparent); }
.service::before { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c1) 14%, transparent), transparent 60%); }

/* خطوات الشغل: كل خطوة لون */
.step:nth-child(1) { --c1: var(--teal-1);   --c2: var(--teal-2); }
.step:nth-child(2) { --c1: var(--blue-1);   --c2: var(--blue-2); }
.step:nth-child(3) { --c1: var(--violet-1); --c2: var(--violet-2); }
.step:nth-child(4) { --c1: var(--pink-1);   --c2: var(--pink-2); }
.step { border-top: 3px solid var(--c1); }
.step .num { background: linear-gradient(135deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step:hover { border-color: var(--c1); }
.step:not(:last-child)::after { background: linear-gradient(90deg, var(--c1), var(--c2)) !important; }

/* الفريق: إطار متدرّج للصور */
.avatar { padding: 3px; background: linear-gradient(135deg, var(--teal-1), var(--blue-1), var(--violet-1)); }
.member:nth-child(2) .avatar { background: linear-gradient(135deg, var(--blue-1), var(--violet-1), var(--pink-1)); }
.member:nth-child(3) .avatar { background: linear-gradient(135deg, var(--violet-1), var(--pink-1), var(--amber-1)); }
.team { background: linear-gradient(160deg, #fff 60%, rgba(155,123,255,.08)); }

/* التواصل */
.contact-box { position: relative; overflow: hidden; }
.contact-box::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--teal-1), var(--blue-1), var(--violet-1), var(--pink-1), var(--amber-1));
}
.contact-info .mono { color: var(--pink-2); }
.contact-form .btn-dark { background: linear-gradient(90deg, var(--teal-2), var(--blue-2), var(--violet-2)); background-size: 200% 100%; transition: background-position .5s, transform .25s; }
.contact-form .btn-dark:hover { background-position: 100% 0; }

/* الفوتر: خط ملوّن فوقه */
.site-footer { border-top: 0; position: relative; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal-1), var(--blue-1), var(--violet-1), var(--pink-1), var(--amber-1)); }

/* ===== Contact details + form (fixes) ===== */
.contact-info .details { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-weight: 600; text-decoration: none;
  color: var(--ink); background: rgba(16,164,183,.10); border: 1px solid rgba(16,164,183,.28);
  transition: background .2s, transform .2s;
}
.contact-link:hover { background: rgba(16,164,183,.18); transform: translateY(-1px); }
.contact-link svg { color: #1FA855; }
.contact-form [aria-invalid="true"] { outline: 2px solid #B42318; outline-offset: 1px; }
.form-note { margin: -4px 0 0; font-size: 13px; color: var(--muted); }
a.lang-toggle { text-decoration: none; display: inline-block; }
.contact-form, .contact-info { min-width: 0; }
.contact-form label { min-width: 0; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-width: 0; box-sizing: border-box; }
@media (max-width: 640px) {
  .contact-form, .contact-info { flex-basis: 100%; }
}
