/* =========================================================
   علي متولي — بورتفوليو
   تصميم داكن سينمائي + «سرب الإيجنتس» اللي بيبني الصفحة
   ========================================================= */

:root {
  --bg: #08090c;
  --bg-2: #0d0f14;
  --surface: #12151b;
  --surface-2: #191d25;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --ink: #f3f1ec;
  --ink-soft: #a5a8af;
  --ink-faint: #7a7f88;
  --red: #ef3e2f;
  --red-2: #ff5b3e;
  --red-deep: #8f1418;
  --gold: #e3b25b;
  --blue: #4c8dff;
  --cyan: #38d6f5;
  --ok: #3ddc84;

  --font-display: "Anton", "Noto Sans Arabic", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-script: "Aref Ruqaa", "Noto Sans Arabic", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --wrap: 1240px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --header-h: 72px;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* الخلفية: توهج أحمر خفيف + نقط كانفس تصميم */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(1100px 640px at 50% -12%, rgba(239, 62, 47, 0.17), transparent 62%),
    radial-gradient(760px 560px at 0% 60%, rgba(76, 141, 255, 0.06), transparent 62%),
    radial-gradient(640px 520px at 100% 100%, rgba(239, 62, 47, 0.06), transparent 60%);
}
body::after {
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 85%);
}

img,
svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; }
::selection { background: rgba(239, 62, 47, 0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 32px, var(--wrap));
  margin-inline: auto;
}

.mono {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
}

.red { color: var(--red); }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- الخط العريض المضغوط ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 62.5%;
  font-synthesis: none;
  letter-spacing: 0;
  line-height: 1.06;
}

.num {
  font-family: "Anton", var(--font-display);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, translate 0.2s;
}
.btn .arr { transition: translate 0.25s; }
.btn:hover .arr { translate: -4px 0; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px rgba(239, 62, 47, 0.7); }
.btn-red:hover { background: var(--red-2); }
.btn-line { border-color: var(--line-2); color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.btn-line:hover { border-color: rgba(239, 62, 47, 0.7); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 9px; }

/* ---------- الهيدر ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.scrolled {
  background: rgba(8, 9, 12, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand svg { width: 34px; height: 34px; }
.brand-name {
  font-size: 25px;
  line-height: 1;
  padding-top: 2px;
}
.brand-name i { color: var(--red); font-style: normal; }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline: auto;
}
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--ink); }
.nav .nav-cta { display: none; }

.header-end {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.avail i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.15);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}
.menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

@media (max-width: 960px) {
  .menu-toggle { display: inline-grid; }
  .header-end .btn { display: none; }
  .nav {
    position: absolute;
    top: calc(var(--header-h) - 4px);
    inset-inline: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 8px;
    background: rgba(16, 18, 24, 0.97);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    translate: 0 -6px;
    transition: opacity 0.2s, translate 0.2s, visibility 0.2s;
  }
  .nav.open { opacity: 1; visibility: visible; translate: 0 0; }
  .nav a { padding: 13px 14px; border-radius: 10px; font-size: 15.5px; }
  .nav a:hover { background: rgba(255, 255, 255, 0.05); }
  .nav .nav-cta { display: block; color: var(--red-2); }
  .header-end { margin-inline-start: auto; }
}
@media (max-width: 420px) {
  .avail { display: none; }
}

/* ---------- عناوين الأقسام ---------- */
.section { position: relative; padding-block: clamp(84px, 11vw, 150px); }
.label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-mono), var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-soft);
}
.label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--red);
}
.label .mono { color: var(--ink); }
.h2 {
  margin: 14px 0 0;
  font-size: clamp(44px, 6.4vw, 94px);
}
.sec-head { margin-bottom: clamp(34px, 4.4vw, 56px); }
.sec-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.sec-note {
  margin: 0;
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 15px;
}

/* =================== الواجهة (Hero) =================== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  padding-block: 12px 72px;
  overflow: clip;
}
.hero-grid {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "intro stats"
    "body  stats";
  column-gap: 32px;
  row-gap: 26px;
  min-height: min(760px, calc(100svh - var(--header-h) - 96px));
}
.hero-intro {
  grid-area: intro;
  align-self: end;
  position: relative;
  z-index: 3;
  max-width: 640px;
}
.hero-body {
  grid-area: body;
  align-self: start;
  position: relative;
  z-index: 3;
  max-width: 380px;
}
.hello {
  margin: 0 0 4px;
  font-family: var(--font-script);
  font-weight: 700;
  font-size: clamp(32px, 3.3vw, 46px);
  line-height: 1.3;
  rotate: -4deg;
  transform-origin: right bottom;
  width: fit-content;
}
.hero-name {
  margin: 0;
  font-size: clamp(56px, 6.8vw, 106px);
  line-height: 1.04;
  white-space: nowrap;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}
.hero-name .dot,
.dot { color: var(--red); }
.hero-role {
  margin: 14px 0 0;
  font-size: clamp(23px, 2.3vw, 33px);
  line-height: 1.12;
  color: var(--red);
}
.hero-lead {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.85;
}
.hero-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
}
.handle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  direction: ltr;
  transition: color 0.2s;
}
.handle:hover { color: var(--ink); }
.handle svg { width: 16px; height: 16px; fill: currentColor; }

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-stage > * {
  position: absolute;
  left: 50%;
  top: 50%;
}
.hero-glow {
  width: min(72vw, 860px);
  aspect-ratio: 1.6;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(239, 62, 47, 0.32), rgba(239, 62, 47, 0.08) 55%, transparent);
  filter: blur(10px);
}
.giant {
  top: 50%;
  margin: 0;
  padding: 0.04em 0.06em 0.36em;
  font-size: clamp(150px, 25vw, 410px);
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  background: linear-gradient(180deg, #ff5b3e 0%, #e53228 38%, #a3171b 70%, rgba(110, 12, 16, 0.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  translate: calc(-50% + var(--px, 0) * 12px) calc(-50% + var(--py, 0) * 8px);
}
.hero-ring {
  z-index: 2;
  width: auto;
  height: min(76vh, 640px);
  max-width: none;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.55));
  translate: calc(-50% + var(--px, 0) * -18px) calc(-50% + var(--py, 0) * -12px);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-1.6deg); }
}

.hero-stats {
  grid-area: stats;
  justify-self: end;
  align-self: center;
  position: relative;
  z-index: 3;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 30px;
}
.hero-stats li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}
.hero-stats .num { font-size: clamp(42px, 4.4vw, 62px); }
.hero-stats .num-wrap { display: flex; align-items: baseline; gap: 5px; direction: ltr; }
.hero-stats .unit { color: var(--red); font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; font-size: 20px; }
.hero-stats span.lbl { color: var(--ink-soft); font-size: 13px; line-height: 1.55; max-width: 13ch; }

.hero-foot {
  position: absolute;
  inset-inline: 0;
  bottom: 18px;
  z-index: 4;
}
.hero-foot .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.replay {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}
.replay:hover { color: var(--ink); }
.replay i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
}
.replay svg { width: 12px; height: 12px; fill: currentColor; translate: -1px 0; }
.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-faint);
  font-size: 12.5px;
}
.scroll-hint::after {
  content: "";
  width: 1px;
  height: 28px;
  background: linear-gradient(var(--ink-faint), transparent);
}

@media (max-width: 899px) {
  .hero { min-height: 0; padding-block: 18px 84px; }
  .hero-grid {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "stage" "body" "stats";
    min-height: 0;
    row-gap: 20px;
  }
  .hero-stage {
    position: relative;
    inset: auto;
    grid-area: stage;
    height: min(104vw, 560px);
    margin-inline: -16px;
  }
  .giant { font-size: 33vw; }
  .hero-ring { height: 94%; }
  .hero-body { max-width: 560px; }
  .hero-stats {
    justify-self: stretch;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
  }
  .hero-stats li { grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: start; }
  .hero-stats .num { font-size: 40px; }
}

/* =================== 01 الشغل =================== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}
.filter {
  appearance: none;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  padding: 7px 16px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
}
.work-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.work-card[hidden] { display: none; }
.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.work-media.on-dark { background: radial-gradient(ellipse at 50% 30%, #1d2230, #0a0c11 75%); }
.work-card:hover .work-media img { scale: 1.045; }
.work-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px 6px;
  border-radius: 999px;
  background: rgba(8, 9, 12, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.work-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.work-info {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding-top: 16px;
}
.work-n { font-size: 34px; color: var(--red); }
.work-title { margin: 0; font-size: 18.5px; font-weight: 600; line-height: 1.35; }
.work-meta { margin: 2px 0 0; font-size: 13px; color: var(--ink-faint); line-height: 1.6; }
.work-go {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  transition: background-color 0.2s, border-color 0.2s;
}
.work-go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.work-card:hover .work-go { background: var(--red); border-color: var(--red); }

.tools-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px 40px;
  margin-top: clamp(56px, 7vw, 84px);
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.tools-label { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.tools-label b { display: block; color: var(--ink); font-weight: 600; }
.tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tools li {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  direction: ltr;
  transition: color 0.2s;
}
.tools li:hover { color: var(--ink); }

@media (max-width: 1023px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .tools-row { grid-template-columns: minmax(0, 1fr); }
  .tools { justify-content: flex-start; gap: 12px 22px; }
}

/* =================== الدقّة =================== */
.frame {
  position: relative;
  isolation: isolate;
}
.frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  transition: opacity 0.5s, scale 0.5s;
}
.precision-panel {
  border-radius: var(--r-lg);
  padding: clamp(28px, 4.6vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(34px, 5vw, 84px);
  align-items: center;
}
.precision-panel::before {
  background:
    radial-gradient(ellipse 60% 70% at 92% 0%, rgba(239, 62, 47, 0.16), transparent 70%),
    linear-gradient(180deg, #12141b, #0c0e13);
  border: 1px solid var(--line);
}
.measure {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 30px 0 8px;
  direction: ltr;
  width: fit-content;
}
.measure .num { font-size: clamp(92px, 10.5vw, 150px); color: var(--ink); }
.measure .unit {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 62.5%;
  font-size: clamp(30px, 3vw, 42px);
  color: var(--red);
  align-self: flex-end;
  padding-bottom: 0.4em;
}
.caliper { width: 26px; height: clamp(90px, 10vw, 140px); color: var(--red); }
.caliper path { fill: none; stroke: currentColor; stroke-width: 2; }
.measure-cap { margin: 0 0 18px; color: var(--ink-soft); font-size: 14px; }
.precision-copy p { color: var(--ink-soft); margin: 0 0 18px; max-width: 46ch; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(239, 62, 47, 0.6);
  padding-bottom: 3px;
  transition: border-color 0.2s, color 0.2s;
}
.text-link:hover { color: var(--red-2); border-color: var(--red-2); }

.rule-list { list-style: none; margin: 0; padding: 0; }
.rule-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.rule-list li:first-child { border-top: 1px solid var(--line); }
.rule-list .n { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.rule-list b { display: block; font-size: 16px; font-weight: 600; line-height: 1.45; }
.rule-list small { display: block; color: var(--ink-faint); font-size: 13px; line-height: 1.65; }
.rule-list .tag { font-family: "Anton", var(--font-display); font-size: 25px; color: var(--red); line-height: 1; direction: ltr; }

@media (max-width: 899px) {
  .precision-panel { grid-template-columns: minmax(0, 1fr); }
}

/* =================== من الشبكة للخاتم =================== */
.raw-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.4fr);
  gap: clamp(30px, 4.4vw, 70px);
  align-items: center;
}
.raw-copy p { color: var(--ink-soft); margin: 22px 0 0; max-width: 40ch; }
.raw-specs {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono), var(--font-body);
  font-size: 12.5px;
  color: var(--ink-faint);
}
.raw-specs li::before { content: "— "; color: var(--red); }

.compare {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse 70% 80% at 50% 30%, #1f2431, #0a0c11 72%);
  user-select: none;
  touch-action: pan-y;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cmp-raw {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  background:
    linear-gradient(rgba(76, 141, 255, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(76, 141, 255, 0.08) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(ellipse 70% 80% at 50% 30%, #101a30, #070a12 72%);
}
.cmp-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  translate: -1px 0;
  background: #fff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.cmp-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  translate: -50% -50%;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}
.cmp-knob svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.compare:has(.cmp-range:focus-visible) .cmp-knob { outline: 3px solid #fff; outline-offset: 3px; }
.cmp-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.cmp-tag {
  position: absolute;
  top: 14px;
  padding: 5px 10px 6px;
  border-radius: 8px;
  background: rgba(8, 9, 12, 0.7);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}
.cmp-tag.t-raw { left: 14px; color: #8fb4ff; }
.cmp-tag.t-real { right: 14px; color: var(--gold); }

@media (max-width: 899px) {
  .raw-grid { grid-template-columns: minmax(0, 1fr); }
}

/* =================== 02 ورا الشغل =================== */
.about-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px 60px;
  align-items: end;
  margin-bottom: clamp(44px, 6vw, 72px);
}
.about-top p { margin: 0; color: var(--ink-soft); max-width: 50ch; }
.about-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 0.92fr);
  gap: clamp(28px, 3.4vw, 52px);
  align-items: start;
}
.col-title {
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.chip-group { margin-bottom: 20px; }
.chip-group h4 { margin: 0 0 9px; font-size: 13px; font-weight: 600; color: var(--red-2); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 5px 11px 6px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  direction: ltr;
  line-height: 1.5;
}

.steps-wrap { position: relative; }
.steps { position: relative; list-style: none; margin: 0; padding: 0; }
.steps-line {
  position: absolute;
  z-index: 0;
  top: 16px;
  bottom: 40px;
  inset-inline-start: 15.5px;
  width: 1px;
  background: linear-gradient(var(--red), rgba(239, 62, 47, 0.08));
  transform-origin: top;
}
.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 24px;
}
.steps .n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 1px solid rgba(239, 62, 47, 0.55);
  color: var(--red-2);
  font-family: "Anton", var(--font-display);
  font-size: 13px;
  line-height: 1;
  direction: ltr;
}
.steps b { display: block; font-size: 16px; font-weight: 600; line-height: 1.5; }
.steps p { margin: 3px 0 0; color: var(--ink-faint); font-size: 13.5px; line-height: 1.7; }

.quote-card {
  border-radius: 20px;
  padding: 30px 28px;
  min-height: 400px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
}
.quote-card::before {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(165deg, #ea3a2c, #a3171b 62%, #5d0b0f);
  box-shadow: 0 30px 70px -30px rgba(239, 62, 47, 0.7);
}
.q-mark { font-family: "Anton", var(--font-display); font-size: 64px; line-height: 0.6; opacity: 0.55; height: 36px; }
.quote-card blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(25px, 2.3vw, 32px);
  line-height: 1.32;
}
.sig { margin: 0; font-family: var(--font-script); font-weight: 700; font-size: 34px; line-height: 1.2; }
.sig small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 12.5px; opacity: 0.75; }

@media (max-width: 1023px) {
  .about-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .quote-card { grid-column: 1 / -1; min-height: 0; }
}
@media (max-width: 760px) {
  .about-top,
  .about-cols { grid-template-columns: minmax(0, 1fr); }
}

/* =================== 03 بعمل إيه =================== */
.svc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.journey-wrap { position: relative; padding-inline-start: 34px; }
.journey {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}
.journey-line {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: 2px;
  background: linear-gradient(var(--red), rgba(239, 62, 47, 0.12));
  transform-origin: top;
}
.journey li {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.journey li:first-of-type { padding-top: 4px; }
.journey li::before {
  content: "";
  position: absolute;
  inset-inline-start: -39px;
  top: 32px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--red);
}
.journey li:first-of-type::before { top: 12px; }
.journey .tag { font-family: var(--font-display); font-weight: 900; font-stretch: 62.5%; font-size: 18px; color: var(--red); padding-top: 2px; }
.journey h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; line-height: 1.45; }
.journey p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.75; }

.wins .h3 { margin: 12px 0 24px; font-size: clamp(34px, 3.6vw, 52px); }
.wins ul { list-style: none; margin: 0; padding: 0; }
.wins li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line-2);
}
.wins li::before { content: "+"; color: var(--red-2); font-family: var(--font-mono); font-weight: 600; font-size: 17px; line-height: 1.5; }
.wins li b { display: block; font-weight: 600; font-size: 15.5px; }
.wins li span { color: var(--ink-faint); font-size: 13.5px; }

@media (max-width: 899px) {
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .journey li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* =================== 04 تواصل =================== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(30px, 3.6vw, 56px);
  align-items: start;
}
.contact-h { margin: 14px 0 18px; font-size: clamp(50px, 5.4vw, 82px); line-height: 1.04; }
.contact-copy > p { margin: 0 0 26px; color: var(--ink-soft); max-width: 36ch; }

.c-list { list-style: none; margin: 0 0 26px; padding: 0; }
.c-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.c-list li:first-child { border-top: 1px solid var(--line); }
.c-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  color: var(--red-2);
}
.c-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.c-k { display: block; font-size: 12px; color: var(--ink-faint); line-height: 1.4; }
.c-v {
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  overflow-wrap: anywhere;
  direction: ltr;
  unicode-bidi: isolate;
}
.c-v:hover { color: var(--red-2); }
.copy-btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 6px 10px 7px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.copy-btn:hover { color: var(--ink); border-color: rgba(255, 255, 255, 0.3); }

.brief { display: grid; gap: 10px; }
.brief label { font-size: 13.5px; font-weight: 600; }
.brief textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.7;
}
.brief textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(239, 62, 47, 0.2); }
.brief-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brief small { color: var(--ink-faint); font-size: 12.5px; }

.live-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 470px;
  padding: 26px;
  border-radius: 20px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}
.live-card::before {
  background:
    linear-gradient(180deg, transparent 30%, rgba(8, 9, 12, 0.94) 72%),
    radial-gradient(ellipse at 50% 20%, rgba(239, 62, 47, 0.3), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
}
.live-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 34%, rgba(8, 9, 12, 0.96) 70%);
  pointer-events: none;
}
.live-phone {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 54%;
  translate: -50% 0;
  rotate: -6deg;
  border-radius: 22px;
  border: 6px solid #1c2b22;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
  z-index: -1;
  transition: rotate 0.5s, translate 0.5s;
}
.live-card:hover .live-phone { rotate: -2deg; translate: -50% -6px; }
.live-card .h3 { margin: 0; font-size: clamp(34px, 3.2vw, 46px); line-height: 1.04; }
.live-card p { margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }
.round-go {
  position: absolute;
  bottom: 26px;
  inset-inline-end: 26px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(239, 62, 47, 0.8);
  transition: scale 0.2s;
}
.live-card:hover .round-go { scale: 1.08; }
.round-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }

@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contact-copy { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .live-card { min-height: 430px; }
}

/* =================== الفوتر =================== */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 46px 0 30px;
  overflow: clip;
}
.foot-mark {
  margin: 0 0 22px;
  font-size: clamp(70px, 15.5vw, 230px);
  line-height: 1.15;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.06);
  user-select: none;
}
.foot-mark .dot { color: rgba(239, 62, 47, 0.55); }
.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  color: var(--ink-faint);
  font-size: 13.5px;
}
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--ink-soft); }
.foot-links a:hover { color: var(--ink); }

/* =================== دراسة الحالة =================== */
.cs-hero { padding-block: clamp(40px, 6vw, 80px) clamp(30px, 4vw, 50px); position: relative; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 30px;
}
.back-link:hover { color: var(--ink); }
.cs-title { display: flex; align-items: center; gap: 22px; }
.cs-title img { width: clamp(72px, 9vw, 112px); border-radius: 24px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8); }
.cs-h1 { margin: 6px 0 0; font-size: clamp(76px, 12vw, 176px); line-height: 1; }
.cs-lead { margin: 30px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.85; color: var(--ink-soft); max-width: 60ch; }
.cs-lead strong { color: var(--ink); }
.cs-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 18px 28px;
  margin: 40px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.cs-meta dt { font-size: 12px; color: var(--ink-faint); margin-bottom: 4px; }
.cs-meta dd { margin: 0; font-weight: 500; font-size: 15px; line-height: 1.6; }
.cs-meta a { color: var(--red-2); text-decoration: none; }

.cs-block { padding-bottom: clamp(44px, 6vw, 76px); }
.cs-cover { margin: 0; }
.browser {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0f1116;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--line);
  direction: ltr;
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2b2f38; }
.browser-bar i:first-child { background: #ff5f57; }
.browser-bar i:nth-child(2) { background: #febc2e; }
.browser-bar i:nth-child(3) { background: #28c840; }
.browser-url {
  margin-inline: auto;
  padding: 3px 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.caption { margin: 14px 0 0; font-size: 13px; color: var(--ink-faint); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 30px 22px 28px; display: grid; gap: 10px; align-content: start; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat .num { font-size: clamp(64px, 7vw, 100px); color: var(--ink); }
.stat .num::after { content: "."; color: var(--red); }
.stat span:last-child { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

.cs-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  padding-block: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
@media (min-width: 960px) {
  .cs-section { grid-template-columns: 280px minmax(0, 1fr); gap: 60px; }
  .cs-side { position: sticky; top: calc(var(--header-h) + 28px); align-self: start; }
}
.cs-n { font-size: 54px; color: var(--red); display: block; margin-bottom: 8px; }
.cs-side h2 { margin: 0; font-size: clamp(40px, 4.4vw, 60px); }
.prose p { margin: 0 0 18px; color: var(--ink-soft); font-size: 17px; line-height: 1.95; max-width: 64ch; }
.prose strong { color: var(--ink); }

.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.card { border-radius: var(--r); padding: 24px; }
.card::before { background: var(--surface); border: 1px solid var(--line); }
.card .emoji { font-size: 28px; line-height: 1; display: block; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.8; }
.note {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-inline-start: 2px solid var(--red);
  background: rgba(239, 62, 47, 0.06);
  border-radius: 4px 12px 12px 4px;
  color: var(--ink-soft);
  font-size: 15px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: clamp(18px, 3vw, 34px);
  border-radius: var(--r-lg);
}
.gallery::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(239, 62, 47, 0.14), transparent 60%), var(--bg-2);
  border: 1px solid var(--line);
}
.gallery.duo { grid-template-columns: repeat(2, minmax(0, 220px)); justify-content: center; margin-top: 30px; }
.shot { margin: 0; }
.phone-frame { border-radius: 26px; overflow: hidden; border: 6px solid #1c1f26; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9); background: #000; }
.shot figcaption { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }
.shot figcaption b { display: block; color: var(--ink); font-size: 15px; }
@media (max-width: 640px) {
  .gallery:not(.duo) {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .gallery:not(.duo) .shot { scroll-snap-align: center; }
}

.features { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.features li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.features .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(239, 62, 47, 0.12); font-size: 20px; }
.features b { display: block; font-size: 15.5px; }
.features span span { color: var(--ink-soft); font-size: 14px; line-height: 1.7; }

.palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
@media (min-width: 560px) { .palette { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .palette { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.swatch { border-radius: 14px; border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.swatch i { display: block; height: 70px; background: var(--c); }
.swatch div { padding: 10px 12px; }
.swatch b { display: block; font-size: 14px; }
.swatch code { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }

.type-list { margin-top: 26px; border-top: 1px solid var(--line); }
.type-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.type-row .role { font-size: 13px; color: var(--ink-faint); }
.type-row .role b { display: block; color: var(--ink); font-family: var(--font-mono); font-weight: 500; font-size: 13px; direction: ltr; text-align: start; }
.sample-serif { font-family: "Noto Serif Arabic", serif; font-weight: 700; font-size: 26px; }
.sample-cairo { font-family: "Cairo", sans-serif; font-size: 22px; }
.sample-mono { font-family: var(--font-mono); font-size: 22px; direction: ltr; unicode-bidi: isolate; }
.inc { color: #7fd99a; }
.exp { color: #ff8a80; }
.money { display: inline-flex; gap: 6px; align-items: baseline; padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.05); font-weight: 600; }

.rules { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.rules li { position: relative; padding: 14px 18px; padding-inline-start: 46px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); color: var(--ink-soft); font-size: 15px; line-height: 1.85; }
.rules li::before { content: ""; position: absolute; inset-inline-start: 18px; top: 23px; width: 12px; height: 2px; background: var(--red); }
.rules b { color: var(--ink); }

.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.stack-item { padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.stack-item b { display: block; font-family: var(--font-mono); font-size: 14px; font-weight: 600; direction: ltr; text-align: start; color: var(--ink); }
.stack-item span { color: var(--ink-soft); font-size: 14px; line-height: 1.7; }

.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.lessons li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.lessons .n { grid-row: span 2; font-size: 44px; color: var(--red); }
.lessons b { font-size: 19px; font-weight: 600; }
.lessons p { margin: 0; color: var(--ink-soft); font-size: 15.5px; line-height: 1.8; }

.cs-cta {
  text-align: center;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 4vw, 60px);
  border-radius: var(--r-lg);
  margin-block: clamp(40px, 6vw, 80px) clamp(60px, 8vw, 110px);
}
.cs-cta::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(239, 62, 47, 0.24), transparent 65%), var(--bg-2);
  border: 1px solid var(--line);
}
.cs-cta .h2 { font-size: clamp(36px, 5vw, 70px); margin: 0 0 14px; }
.cs-cta p { margin: 0 auto 28px; color: var(--ink-soft); max-width: 46ch; }
.cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* =========================================================
   سرب الإيجنتس
   ========================================================= */
[data-build]:not(.site-header) { position: relative; }
.agents-on [data-b]:not([data-b="frame"]):not(.is-built):not(.is-building) { opacity: 0; }
.agents-on [data-b="frame"]:not(.is-built)::before { opacity: 0; scale: 0.985; }

.ag-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
}
.ag {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 22px;
  transform-origin: 1.5px 1.5px;
  will-change: transform;
  transition: opacity 0.45s;
}
.ag.is-hidden { opacity: 0; }
.ag-arrow { width: 17px; height: 22px; overflow: visible; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55)); }
.ag-arrow path { fill: var(--c); stroke: #07080b; stroke-width: 1.3; stroke-linejoin: round; }
.ag-beam { display: none; position: absolute; left: -4px; top: -10px; width: 11px; height: 22px; overflow: visible; }
.ag-beam path { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8)); }
.ag.is-typing .ag-arrow { display: none; }
.ag.is-typing .ag-beam { display: block; }
.ag-tag {
  position: absolute;
  top: 19px;
  left: 13px;
  padding: 3px 7px 4px;
  border-radius: 2px 8px 8px 8px;
  background: var(--c);
  color: #07080b;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  scale: 0.7;
  transform-origin: 0 0;
  transition: opacity 0.2s, scale 0.2s;
}
.ag.is-working .ag-tag { opacity: 1; scale: 1; }
.ag.is-typing .ag-tag { top: 14px; left: 10px; }

.ag-ov {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.ag-ov::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  background-image:
    linear-gradient(rgba(76, 141, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 141, 255, 0.1) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(transparent, #000 10%, #000 90%, transparent);
}
.bp-on > .ag-ov::before { opacity: 1; }

.ag-ghost {
  position: absolute;
  border: 1px dashed rgba(96, 150, 255, 0.55);
  background: rgba(76, 141, 255, 0.05);
  border-radius: 3px;
  transition: opacity 0.25s;
}
.ag-ghost[data-t="frame"] { border-color: rgba(96, 150, 255, 0.35); background: transparent; }
.ag-ghost[data-t="img"] {
  background:
    linear-gradient(to top right, transparent calc(50% - 0.6px), rgba(96, 150, 255, 0.4) 50%, transparent calc(50% + 0.6px)),
    linear-gradient(to top left, transparent calc(50% - 0.6px), rgba(96, 150, 255, 0.4) 50%, transparent calc(50% + 0.6px)),
    rgba(76, 141, 255, 0.05);
}
.ag-ghost span {
  position: absolute;
  bottom: calc(100% + 4px);
  inset-inline-start: -1px;
  font-family: var(--font-mono), var(--font-body);
  font-size: 10px;
  line-height: 1;
  color: rgba(140, 180, 255, 0.95);
  white-space: nowrap;
}

.ag-sel {
  position: absolute;
  border: 1.5px solid var(--c);
  opacity: 0;
  transition: opacity 0.25s;
}
.ag-sel.out { opacity: 0 !important; }
.ag-sel i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1.5px solid var(--c);
}
.ag-sel i:nth-child(1) { top: -4.5px; left: -4.5px; }
.ag-sel i:nth-child(2) { top: -4.5px; right: -4.5px; }
.ag-sel i:nth-child(3) { bottom: -4.5px; left: -4.5px; }
.ag-sel i:nth-child(4) { bottom: -4.5px; right: -4.5px; }
.ag-sel b {
  position: absolute;
  bottom: calc(100% + 7px);
  right: -1.5px;
  padding: 2px 6px 3px;
  border-radius: 4px;
  background: var(--c);
  color: #07080b;
  font-family: var(--font-mono), var(--font-body);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.ag-hl {
  position: absolute;
  background: rgba(76, 141, 255, 0.22);
  transition: opacity 0.4s;
}
.ag-hl.out,
.ag-guide.out { opacity: 0; }
.ag-caret {
  position: absolute;
  width: 2px;
  margin-left: -1px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}
.ag-scanl {
  position: absolute;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, #b9d2ff 20%, #fff 50%, #b9d2ff 80%, transparent);
  box-shadow: 0 0 16px 2px rgba(76, 141, 255, 0.8);
}
.ag-guide {
  position: absolute;
  background: rgba(96, 150, 255, 0.6);
  transition: opacity 0.5s;
}
.ag-guide.h { left: 0; right: 0; height: 1px; transform-origin: right; }
.ag-guide.v { top: 0; bottom: 0; width: 1px; transform-origin: top; }
.ag-guide em {
  position: absolute;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #9dbcff;
  background: rgba(8, 9, 12, 0.85);
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  direction: ltr;
}
.ag-guide.h em { right: 6px; top: -16px; }
.ag-guide.v em { top: 6px; left: 5px; }

.ag-scan {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 65;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.55s, visibility 0.55s;
}
.agents-on .ag-scan { display: grid; }
.ag-scan.out { opacity: 0; visibility: hidden; }
.ag-scan svg { width: 62px; height: 62px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; scale: 0.94; } }

.ag-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 75;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 7px 7px 14px;
  padding-inline: 14px 7px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(15, 17, 22, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  color: var(--ink-soft);
  font-size: 12.5px;
  white-space: nowrap;
  transition: opacity 0.4s, translate 0.4s;
}
.ag-bar.is-min .ag-meta,
.ag-bar.is-min .ag-prog,
.ag-bar.is-min .ag-status { display: none; }
.ag-dots { display: flex; padding-inline-start: 6px; }
.ag-dots i {
  width: 16px;
  height: 16px;
  margin-inline-start: -6px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid #12141a;
}
.ag-meta b { color: var(--ink); font-weight: 600; font-family: var(--font-mono); }
.ag-prog { width: 86px; height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.ag-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width 0.3s; }
.ag-bar.is-done .ag-prog i { background: var(--ok); }
.ag-status { color: var(--ink); font-weight: 500; }
.ag-bar.is-done .ag-status { color: #8ff0b5; }
.ag-btn {
  appearance: none;
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ag-btn:hover { background: rgba(255, 255, 255, 0.14); }
.ag-btn.ag-auto { background: var(--blue); color: #fff; }
.ag-btn.ag-auto:hover { background: #6aa0ff; }
.ag-btn[hidden] { display: none; }
.ag-btn svg { width: 13px; height: 13px; fill: currentColor; }
.ag-btn.ag-x svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 640px) {
  .ag-bar { bottom: 10px; gap: 8px; padding-inline: 10px 6px; }
  .ag-l,
  .ag-prog { display: none; }
  .ag-status { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
  .ag-bar.has-auto [data-act="skip"] { display: none; }
}
@media (max-width: 380px) {
  .ag-status { display: none; }
}

/* ---------- حركة أقل ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-ring { animation: none; }
  .replay { display: none; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .agents-on [data-b] { opacity: 1 !important; }
  .ag-layer,
  .ag-bar,
  .ag-scan,
  .site-header { display: none !important; }
}
