/* AI-News-Reels — نفس لغة البورتفوليو: أبيض وأسود + خطوط رفيعة + لون واحد بحساب */
:root {
  --ink: #111111;
  --ink-soft: #1c1c1c;
  --body: #5c5c5c;
  --muted: #8c8c8c;
  --line: #e6e5e3;
  --surface: #ffffff;
  --surface-alt: #f7f7f5;
  --accent: #6b28ff; /* بنفسجي القناة — بيظهر في أماكن قليلة بس */
  --accent-2: #22d3ee;
  --accent-soft: #f1ebff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: 1.25rem;
  --max: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2f0;
    --ink-soft: #e4e4e2;
    --body: #a3a3a0;
    --muted: #767673;
    --line: #262626;
    --surface: #0b0b0b;
    --surface-alt: #131313;
    --accent-soft: #1d1433;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f2f2f0;
  --ink-soft: #e4e4e2;
  --body: #a3a3a0;
  --muted: #767673;
  --line: #262626;
  --surface: #0b0b0b;
  --surface-alt: #131313;
  --accent-soft: #1d1433;
  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Inter", "IBM Plex Sans Arabic", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
[dir="rtl"] body, body[dir="rtl"] { font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; }
img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--surface); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
button { font: inherit; cursor: pointer; }

.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
@media (min-width: 768px) { :root { --pad: 2rem; } }

.label {
  font-family: "Inter", sans-serif;
  font-size: 0.6875rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
[dir="rtl"] .label.ar { font-family: "IBM Plex Sans Arabic", sans-serif; letter-spacing: 0; font-size: 0.8125rem; }

/* ───────── header ───────── */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .shell { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: "Inter", sans-serif; font-weight: 800; font-style: italic; letter-spacing: -0.02em; font-size: 1.05rem; direction: ltr; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { color: var(--accent); font-weight: 800; }
.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a.link { display: none; text-decoration: none; font-size: 0.875rem; color: var(--body); padding: 0.5rem 0.75rem; border-radius: 999px; transition: color 0.2s; }
.nav a.link:hover { color: var(--ink); }
@media (min-width: 768px) { .nav a.link { display: inline-block; } }
.pill-btn {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.pill-btn:hover { border-color: var(--ink); }
.pill-btn svg { width: 15px; height: 15px; }

/* ───────── hero ───────── */
.hero { position: relative; padding: 4.5rem 0 3rem; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.hero .shell { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 6rem 0 4rem; } .hero .shell { grid-template-columns: 1.15fr 1fr; } }
h1 .nowrap { white-space: nowrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.dot { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
h1 {
  margin: 1.4rem 0 0;
  font-size: clamp(2.25rem, 6.5vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
}
[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.3; }
h1 em { font-style: normal; color: var(--accent); }
.lead { margin: 1.25rem 0 0; max-width: 34rem; font-size: 1.0625rem; line-height: 1.75; color: var(--body); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--surface); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; }

/* phones stack */
.stage {
  position: relative;
  height: 32rem;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 20%, #3b1d8f 0%, transparent 55%), radial-gradient(circle at 80% 85%, #0e4c63 0%, transparent 55%), linear-gradient(160deg, #0b0f2a, #160f45 60%, #0b0f2a);
  overflow: hidden;
  perspective: 1600px;
  isolation: isolate;
}
.stage::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none; }
.phone {
  position: absolute;
  width: 11.5rem;
  aspect-ratio: 9 / 16;
  border-radius: 1.6rem;
  padding: 0.4rem;
  background: linear-gradient(150deg, #3a3f5c, #0e1124 45%, #2b2f48);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(107, 40, 255, 0.25);
  transition: transform 0.8s var(--ease);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 1.25rem; }
.phone.p1 { left: 50%; top: 50%; transform: translate(-50%, -50%) rotateY(-14deg) rotateX(8deg); z-index: 3; width: 13rem; }
.phone.p2 { left: 8%; top: 18%; transform: rotateY(22deg) rotateX(6deg) rotate(-8deg) scale(0.88); z-index: 2; opacity: 0.9; }
.phone.p3 { right: 8%; top: 22%; transform: rotateY(-26deg) rotateX(6deg) rotate(8deg) scale(0.88); z-index: 1; opacity: 0.9; }
.stage:hover .phone.p1 { transform: translate(-50%, -52%) rotateY(-6deg) rotateX(4deg); }
.stage:hover .phone.p2 { transform: rotateY(16deg) rotateX(4deg) rotate(-10deg) scale(0.9) translateX(-6px); }
.stage:hover .phone.p3 { transform: rotateY(-18deg) rotateX(4deg) rotate(10deg) scale(0.9) translateX(6px); }
.spark { position: absolute; width: 34px; height: 34px; z-index: 4; animation: spin 9s linear infinite; filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.9)); }
.spark.s1 { top: 10%; right: 22%; }
.spark.s2 { bottom: 12%; left: 20%; width: 22px; height: 22px; animation-duration: 6s; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
  .stage { height: 26rem; }
  .phone { width: 8.5rem; }
  .phone.p1 { width: 10rem; }
  .phone.p2 { left: 2%; }
  .phone.p3 { right: 2%; }
}

/* ───────── marquee strip ───────── */
.strip { border-block: 1px solid var(--line); overflow: hidden; }
.strip .track { display: flex; gap: 3rem; padding: 1.1rem 0; width: max-content; animation: marquee 32s linear infinite; }
[dir="rtl"] .strip .track { animation-name: marquee-rtl; }
.strip span { white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .strip .track, .spark, .dot { animation: none; } }

/* ───────── sections ───────── */
section.block { padding: 5rem 0; }
.sec-head { display: grid; gap: 1rem; margin-bottom: 2.75rem; }
@media (min-width: 1024px) { .sec-head { grid-template-columns: 1fr 1.4fr; align-items: end; } }
h2 { margin: 0.9rem 0 0; font-size: clamp(1.75rem, 4.5vw, 2.25rem); line-height: 1.2; letter-spacing: -0.022em; font-weight: 700; }
[dir="rtl"] h2 { letter-spacing: 0; line-height: 1.4; }
.sec-head p { margin: 0; color: var(--body); line-height: 1.75; max-width: 34rem; }

.steps { display: grid; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: 1.75rem 1.5rem 2rem; border-bottom: 1px solid var(--line); background: var(--surface); transition: background 0.3s var(--ease); }
.step:hover { background: var(--surface-alt); }
@media (min-width: 768px) { .step { border-inline-end: 1px solid var(--line); } }
@media (min-width: 1024px) { .step { border-bottom: 0; } .step:last-child { border-inline-end: 0; } }
.step .num { font-family: "Inter", sans-serif; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.step .ico { width: 2.75rem; height: 2.75rem; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin: 1.4rem 0 1.1rem; }
.step .ico svg { width: 20px; height: 20px; }
.step h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.step p { margin: 0.6rem 0 0; color: var(--body); font-size: 0.9375rem; line-height: 1.7; }

.principles { display: grid; gap: 1rem; }
@media (min-width: 768px) { .principles { grid-template-columns: repeat(2, 1fr); } }
.principle { display: flex; gap: 1rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 18px; }
.principle .ico { flex: none; width: 2.5rem; height: 2.5rem; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--line); }
.principle .ico svg { width: 18px; height: 18px; }
.principle h3 { margin: 0.35rem 0 0; font-size: 1rem; font-weight: 600; }
.principle p { margin: 0.5rem 0 0; color: var(--body); font-size: 0.9375rem; line-height: 1.7; }

.cta {
  margin: 0 0 5rem;
  padding: 3rem 1.5rem;
  border-radius: 28px;
  text-align: center;
  background: var(--ink);
  color: var(--surface);
  position: relative;
  overflow: hidden;
}
.cta::before { content: ""; position: absolute; width: 30rem; height: 30rem; left: 50%; top: -18rem; transform: translateX(-50%); background: radial-gradient(circle, rgba(107, 40, 255, 0.45), transparent 65%); pointer-events: none; }
.cta h2 { position: relative; margin: 0 auto; max-width: 30rem; }
.cta p { position: relative; color: color-mix(in srgb, var(--surface) 65%, transparent); margin: 0.9rem auto 1.8rem; max-width: 30rem; line-height: 1.7; }
.cta .btn { position: relative; background: var(--surface); color: var(--ink); }
.cta img { position: relative; width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 1.25rem; }

/* ───────── legal pages ───────── */
.doc { padding: 4rem 0 5rem; }
.doc .shell { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin-top: 1rem; }
.doc .meta { margin-top: 1rem; color: var(--muted); font-size: 0.875rem; }
.doc h2 { font-size: 1.25rem; margin-top: 2.5rem; letter-spacing: -0.01em; }
.doc p, .doc li { color: var(--body); line-height: 1.8; font-size: 1rem; }
.doc ul { padding-inline-start: 1.25rem; }
.doc code { font-size: 0.875em; background: var(--surface-alt); border: 1px solid var(--line); border-radius: 6px; padding: 0.1em 0.4em; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 3.5rem 0; }
.doc .ar { direction: rtl; text-align: right; font-family: "IBM Plex Sans Arabic", sans-serif; }

/* ───────── footer ───────── */
.footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; }
.footer .shell { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer nav a { color: var(--body); text-decoration: none; font-size: 0.875rem; }
.footer nav a:hover { color: var(--ink); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
