/* ==========================================================================
   TechneTools — v2
   مبني على قياسات raycast.com الفعلية (مش من الذاكرة):
     الأرضية #07080A · الأسطح rgba(255,255,255,.05) · الزوايا 11px
     الزرار أبيض على أسود · العنوان 36px/600 · النص 14-16px · العرض 818px
   الفرق الوحيد: العربي محتاج عرض وحجم أكبر شوية من اللاتيني.

   اللون في الصفحة كله بييجي من صور البرامج — الكروم نفسه رمادي وأسود.
   ========================================================================== */

:root {
  color-scheme: dark;

  --ink:       #07080a;
  --ink-soft:  #0b0d11;

  --surface-1: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-3: rgba(255, 255, 255, .10);
  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .14);

  --text:   #ffffff;
  --text-2: rgba(255, 255, 255, .62);
  --text-3: rgba(255, 255, 255, .40);

  /* الزرار الأساسي أبيض على أسود — زي Raycast بالظبط */
  --btn-bg: #ededf0;
  --btn-fg: #0a0b0e;

  /* ألوان البرامج نفسها — متاخدة من واجهاتها */
  --fb: #ff3d8b;
  --tg: #38bdf8;
  --xe: #2ee6c5;

  --font: 'IBM Plex Sans Arabic', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;

  --fs-hero:  clamp(1.9rem, 4.6vw, 3rem);
  --fs-h2:    clamp(1.35rem, 2.9vw, 1.8rem);
  --fs-h3:    1.0625rem;
  --fs-body:  1rem;
  --fs-sm:    .875rem;
  --fs-xs:    .75rem;

  --r-sm:   8px;
  --r:      11px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-pill: 999px;

  --maxw:   980px;
  --maxw-wide: 1140px;
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --sec:    clamp(4rem, 10vw, 7.5rem);

  --sh-1: 0 1px 2px rgba(0,0,0,.4);
  --sh-2: 0 8px 24px rgba(0,0,0,.45);
  --sh-3: 0 24px 60px rgba(0,0,0,.6);

  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box }

html { -webkit-text-size-adjust: 100% }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block }
a { color: inherit; text-decoration: none }
button { font: inherit; color: inherit }
:is(a, button, summary, input, textarea):focus-visible {
  outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px;
}
::selection { background: rgba(255,255,255,.18) }

h1, h2, h3 { margin: 0; line-height: 1.22; font-weight: 600; text-wrap: balance }
p { margin: 0 }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter) }
.wrap--wide { max-width: var(--maxw-wide) }
.sec { padding-block: var(--sec) }

.eyebrow {
  font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-3); direction: ltr; display: inline-block;
}
.lead { color: var(--text-2); font-size: 1.0625rem }
.muted { color: var(--text-2) }
.sm { font-size: var(--fs-sm) }
.nums { font-variant-numeric: tabular-nums }

/* ---------------- الأزرار ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 600; line-height: 1;
  padding: .75rem 1.1rem; border: 0; border-radius: var(--r-sm); cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: transform .15s var(--ease), background .15s var(--ease), opacity .15s var(--ease);
}
.btn:hover { background: #fff; transform: translateY(-1px) }
.btn--ghost { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line) }
.btn--ghost:hover { background: var(--surface-3) }
.btn--lg { font-size: var(--fs-body); padding: .9rem 1.5rem }
.btn-row { display: flex; gap: .625rem; flex-wrap: wrap }

/* ---------------- الهيدر ---------------- */
.hdr {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(7,8,10,.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.hdr[data-scrolled] { border-bottom-color: var(--line); background: rgba(7,8,10,.94) }
.hdr .bar { display: flex; align-items: center; gap: 1.25rem; height: 56px }
.brand { font-weight: 700; font-size: .9375rem; letter-spacing: -.01em; flex-shrink: 0 }
.brand i { font-style: normal; color: var(--fb) }
.hdr nav { display: flex; gap: 1.25rem; margin-inline-start: .75rem }
.hdr nav a { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); transition: color .15s }
.hdr nav a:hover { color: var(--text) }
.hdr .end { margin-inline-start: auto; display: flex; align-items: center; gap: .625rem }
.lang { display: flex; gap: .25rem; font-family: var(--mono); font-size: var(--fs-xs) }
.lang a { color: var(--text-3); padding: .25rem .4rem; border-radius: 5px }
.lang a[aria-current] { background: var(--surface-2); color: var(--text) }
@media (max-width: 760px) { .hdr nav { display: none } }

/* ---------------- الهيرو ---------------- */
.hero { text-align: center; padding-block: clamp(3.5rem, 9vw, 6.5rem) 0 }
.hero h1 { font-size: var(--fs-hero); max-width: 17ch; margin-inline: auto; letter-spacing: -.02em }
.hero .lead { max-width: 46ch; margin: 1.1rem auto 0 }
.hero .btn-row { justify-content: center; margin-top: 1.75rem }
.hero .note { margin-top: 1rem; font-size: var(--fs-sm); color: var(--text-3) }

/* لوح الصورة الكبير تحت الهيرو — ده قلب الوصفة */
.shot {
  position: relative; margin-top: clamp(2.5rem, 6vw, 4rem);
  border-radius: var(--r-xl); overflow: hidden;
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line), var(--sh-3);
}
.shot img { width: 100%; height: auto }
/* توهج خافت خلف الصورة بلون البرنامج */
.shot::before {
  content: ''; position: absolute; inset: auto 10% -40% 10%; height: 55%;
  background: radial-gradient(60% 100% at 50% 100%, var(--tint, var(--fb)), transparent 70%);
  opacity: .22; filter: blur(42px); pointer-events: none; z-index: -1;
}
.shot-wrap { position: relative; isolation: isolate }

/* ---------------- بيان قصير في النص ---------------- */
.say { text-align: center; max-width: 34ch; margin-inline: auto }
.say h2 { font-size: var(--fs-h2); letter-spacing: -.015em }
.say p { color: var(--text-2); margin-top: .6rem; font-size: var(--fs-sm) }

/* ---------------- شريط الأرقام ---------------- */
.strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line);
  border-radius: var(--r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line);
}
.strip > div { background: var(--ink); padding: 1.25rem 1rem; text-align: center }
.strip b { display: block; font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums }
.strip span { display: block; font-size: var(--fs-sm); color: var(--text-2); margin-top: .15rem }

/* ---------------- بلوك المنتج ---------------- */
.prod { padding-block: var(--sec) }
.prod + .prod { border-top: 1px solid var(--line) }
.prod__top { text-align: center; max-width: 40ch; margin: 0 auto 2.5rem }
.prod__tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--fs-xs); font-family: var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--c); direction: ltr;
  padding: .25rem .6rem; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--c) 14%, transparent);
}
.prod__top h2 { font-size: var(--fs-h2); margin-top: .9rem; letter-spacing: -.015em }
.prod__top p { color: var(--text-2); margin-top: .6rem; font-size: var(--fs-sm) }

/* شبكة اللقطات التفصيلية */
.details { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem }
.detail {
  background: var(--surface-1); border-radius: var(--r); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.detail:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-2) }
.detail img { width: 100%; height: auto }
.detail figcaption { padding: .7rem .9rem .85rem; font-size: var(--fs-sm); color: var(--text-2) }
.detail--full { grid-column: 1 / -1 }
@media (max-width: 680px) { .details { grid-template-columns: 1fr } }

.prod__foot {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem .75rem; flex-wrap: wrap; margin-top: 2rem;
}
.price { font-size: var(--fs-sm); color: var(--text-2) }
.price b { color: var(--text); font-size: 1.25rem; font-weight: 600; margin-inline: .25rem }

/* ---------------- الباقات ---------------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 2.5rem }
.plan {
  display: flex; flex-direction: column; gap: .9rem;
  background: var(--surface-1); border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.plan--best { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2) }
.plan h3 { font-size: var(--fs-h3) }
.plan .amt { display: flex; align-items: baseline; gap: .35rem }
.plan .amt b { font-size: 2.1rem; font-weight: 600; font-variant-numeric: tabular-nums }
.plan .amt span { font-size: var(--fs-sm); color: var(--text-2) }
.plan .was { font-size: var(--fs-sm); color: var(--text-3) }
.plan .was s { margin-inline: .2rem }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: var(--fs-sm); color: var(--text-2) }
.plan li { display: flex; gap: .5rem }
.plan li::before { content: '✓'; color: var(--text); flex-shrink: 0 }
.plan .btn { margin-top: auto }
.pill {
  align-self: flex-start; font-size: var(--fs-xs); font-weight: 600;
  padding: .2rem .55rem; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text);
}

/* ---------------- أسئلة ---------------- */
.faq { margin-top: 2rem; border-radius: var(--r-lg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line) }
.faq details { border-bottom: 1px solid var(--line) }
.faq details:last-child { border-bottom: 0 }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.25rem; cursor: pointer; list-style: none; font-weight: 500; font-size: var(--fs-sm);
}
.faq summary::-webkit-details-marker { display: none }
.faq summary::after { content: '+'; color: var(--text-3); font-size: 1.1rem; line-height: 1 }
.faq details[open] summary::after { content: '−' }
.faq .ans { padding: 0 1.25rem 1.2rem; color: var(--text-2); font-size: var(--fs-sm); max-width: 62ch }

/* ---------------- الفوتر ---------------- */
.ftr { border-top: 1px solid var(--line); padding-block: 2.5rem; margin-top: var(--sec) }
.ftr .row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center }
.ftr a { color: var(--text-2); font-size: var(--fs-sm) }
.ftr a:hover { color: var(--text) }
.ftr .links { display: flex; gap: 1.1rem; flex-wrap: wrap }

/* ---------------- حركة ---------------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
.js [data-r] { opacity: 0 }
.js [data-r].on { animation: fade-up .7s var(--ease) both }

@media (prefers-reduced-motion: reduce) {
  .js [data-r], .js [data-r].on { opacity: 1; animation: none; transform: none }
  .btn:hover, .detail:hover { transform: none }
}

/* ==========================================================================
   لوحة المنتج الموضّحة — صورة كاملة عليها نقاط مرقّمة + شرح تحتها
   بديل القصّ: الواجهة بتفضل كاملة والزائر يفهم كل جزء فيها.
   ========================================================================== */

.panel { position: relative; border-radius: var(--r-lg); overflow: hidden;
         background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line), var(--sh-3) }
.panel img { width: 100%; height: auto; display: block }

/* الشرح تحت الصورة */
.legend {
  list-style: none; margin: 1.25rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .75rem;
}
.legend li {
  display: grid; grid-template-columns: 24px 1fr; gap: .7rem; align-items: start;
  background: var(--surface-1); border-radius: var(--r); padding: .8rem .9rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.legend .n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 1;
  background: var(--c, #fff); color: #07080a;
}
.legend b { display: block; font-size: var(--fs-sm); font-weight: 600 }
.legend span { display: block; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.6 }

@media (prefers-reduced-motion: reduce) {
}

/* ---------- بلوك المنتج: صورة أصغر جنب الشرح ---------- */
.prod__grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
}
.prod__grid .panel { margin: 0 }
.prod__grid > * { min-width: 0 }

.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem }
.feats li { display: grid; grid-template-columns: 7px 1fr; gap: .85rem; align-items: start }
.feats li::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c, #fff); margin-top: .55rem;
}
.feats b { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: .15rem }
.feats span { display: block; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.65 }

@media (max-width: 860px) { .prod__grid { grid-template-columns: 1fr } }

/* ==========================================================================
   صفحة قانونية — عمود نص واحد، مفيش أي حاجة تانية معاه
   ========================================================================== */

.legal { max-width: 46rem; margin-inline: auto; padding-block: clamp(2.5rem, 6vw, 4.5rem) }
.legal__head { padding-bottom: 1.75rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--line) }
.legal__head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em }
.legal__meta { margin-top: .75rem; display: flex; gap: .5rem 1.25rem; flex-wrap: wrap;
               font-size: var(--fs-sm); color: var(--text-3) }
.legal__intro { margin-top: 1.25rem; color: var(--text-2); font-size: 1.0625rem; line-height: 1.8 }

.legal section + section { margin-top: 2.5rem }
.legal h2 {
  font-size: 1.125rem; font-weight: 600; margin-bottom: .9rem;
  padding-bottom: .6rem; border-bottom: 1px solid var(--line);
}
.legal p { color: var(--text-2); line-height: 1.85 }
.legal p + p { margin-top: .9rem }
.legal strong { color: var(--text); font-weight: 600 }

.legal ul { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .8rem }
.legal ul li { display: grid; grid-template-columns: 6px 1fr; gap: .8rem; align-items: start;
               color: var(--text-2); line-height: 1.8 }
.legal ul li::before { content: ''; width: 6px; height: 6px; border-radius: 50%;
                       background: var(--text-3); margin-top: .72rem }

/* بوكس بارز لحقوق الحذف — ده اللي الناس بتدوّر عليه */
.legal__box {
  background: var(--surface-1); border-radius: var(--r-lg); padding: 1.5rem;
  box-shadow: inset 0 0 0 1px var(--line); margin-top: 1rem;
}
.legal__box .ways { display: grid; gap: .6rem; margin-top: 1rem }
.legal__box .ways a {
  display: inline-flex; align-items: center; gap: .55rem; width: fit-content;
  font-size: var(--fs-sm); font-weight: 500;
  padding: .55rem .85rem; border-radius: var(--r-sm);
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .15s var(--ease);
}
.legal__box .ways a:hover { background: var(--surface-3) }

.legal__foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
               display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
               font-size: var(--fs-sm); color: var(--text-3) }
