/* ===== مدى التقنية — نظام تصميم مشترك لكل صفحات الموقع ===== */

:root{
  --bg:#F5F7F8;
  --surface:#FFFFFF;
  --surface-2:#EEF2F4;
  --surface-3:#0E1B2B;
  --ink:#0E1B2B;
  --ink-on-3:#F2F6F7;
  --muted:#57697A;
  --muted-on-3:#9FB3C0;
  --border:#DEE4E8;
  --border-on-3:#243447;
  --accent:#12A38C;
  --accent-ink:#0C7C6B;
  --accent-soft:#DCF3EE;
  --accent-2:#F2A73B;
  --accent-2-ink:#8A5A12;
  --radius:16px;
  --radius-sm:10px;
  --maxw:1120px;
  --shadow: 0 1px 2px rgba(14,27,43,.04), 0 8px 24px -12px rgba(14,27,43,.12);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0B1420;
    --surface:#111C29;
    --surface-2:#16222F;
    --surface-3:#08111B;
    --ink:#E7EDF1;
    --ink-on-3:#EDF3F5;
    --muted:#8CA0AF;
    --muted-on-3:#8CA0AF;
    --border:#213240;
    --border-on-3:#1E2C3A;
    --accent:#2FC6AC;
    --accent-ink:#7FE4CF;
    --accent-soft:#12332C;
    --accent-2:#F2B24C;
    --accent-2-ink:#F2B24C;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"]{
  --bg:#0B1420;
  --surface:#111C29;
  --surface-2:#16222F;
  --surface-3:#08111B;
  --ink:#E7EDF1;
  --ink-on-3:#EDF3F5;
  --muted:#8CA0AF;
  --muted-on-3:#8CA0AF;
  --border:#213240;
  --border-on-3:#1E2C3A;
  --accent:#2FC6AC;
  --accent-ink:#7FE4CF;
  --accent-soft:#12332C;
  --accent-2:#F2B24C;
  --accent-2-ink:#F2B24C;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.5);
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
html{ scroll-behavior:smooth; scroll-padding-top:96px; }
body{
  background:var(--bg);
  color:var(--ink);
  font-family:'Noto Sans Arabic','Noto Sans',sans-serif;
}
[dir="rtl"] body, .app{ direction:rtl; }
[dir="ltr"] .app{ direction:ltr; }

.app{ overflow-x:clip; }

h1,h2,h3,h4{
  font-family:'IBM Plex Sans Arabic','IBM Plex Sans',sans-serif;
  text-wrap:balance;
  margin:0;
  color:var(--ink);
}
p{ line-height:1.85; margin:0; color:var(--ink); }
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; }
button{ font-family:inherit; }

.wrap{ max-width:var(--maxw); margin-inline:auto; padding-inline:22px; }

a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline:2px solid var(--accent); outline-offset:2px; border-radius:6px;
}

/* ---------- eyebrow / labels ---------- */
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size:.76rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--accent-ink); background:var(--accent-soft);
  padding:6px 14px; border-radius:999px; margin-bottom:14px;
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-weight:700; font-size:.94rem; padding:12px 22px; border-radius:999px;
  border:1px solid transparent; cursor:pointer; white-space:nowrap;
  transition:transform .18s ease, filter .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
}
.btn:active{ transform:translateY(0) scale(.98); }
.btn-primary{ background:var(--accent); color:#04211C; }
.btn-primary:hover{ filter:brightness(1.06); transform:translateY(-2px); box-shadow:0 12px 24px -12px rgba(18,163,140,.55); }
.btn-outline{ background:transparent; border-color:var(--border); color:var(--ink); }
.btn-outline:hover{ border-color:var(--accent); color:var(--accent-ink); transform:translateY(-2px); }
.btn-on-dark{ background:var(--accent); color:#04211C; }
.btn-on-dark:hover{ filter:brightness(1.06); transform:translateY(-2px); box-shadow:0 12px 24px -12px rgba(18,163,140,.55); }
.btn-ghost-on-dark{ background:transparent; border-color:var(--border-on-3); color:var(--ink-on-3); }
.btn-ghost-on-dark:hover{ border-color:var(--accent); color:var(--accent-ink); transform:translateY(-2px); }
.btn-lg{ padding:14px 28px; font-size:1rem; }

/* ---------- site header ---------- */
.site-header{
  position:sticky; top:0; z-index:40;
  background:color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);
  padding-block:14px;
  transition:box-shadow .25s ease;
}
.site-header.is-scrolled{ box-shadow:var(--shadow); }
.site-header .wrap{ display:flex; align-items:center; justify-content:space-between; gap:18px; }
.brand{ display:flex; align-items:center; gap:11px; }
.brand-mark{
  width:38px; height:38px; border-radius:11px; flex-shrink:0;
  background:linear-gradient(155deg, var(--accent), var(--accent-ink));
  display:flex; align-items:center; justify-content:center;
}
.brand-text{ display:flex; flex-direction:column; line-height:1.25; }
.brand-ar{ font-family:'IBM Plex Sans Arabic',sans-serif; font-weight:700; font-size:1.04rem; }
.brand-en{ font-size:.7rem; color:var(--muted); letter-spacing:.03em; direction:ltr; text-align:start; }

.nav{ display:flex; align-items:center; gap:26px; }
.nav-links{ display:flex; align-items:center; gap:22px; }
.nav-links a{ position:relative; font-size:.9rem; font-weight:600; color:var(--muted); padding-bottom:5px; transition:color .2s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"]{ color:var(--ink); }
.nav-links a::after{
  content:""; position:absolute; inset-inline-start:0; bottom:-3px; height:2px; width:0;
  background:var(--accent); border-radius:2px; transition:width .25s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after{ width:100%; }
.nav-actions{ display:flex; align-items:center; gap:10px; }
.lang-btn{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--surface-2); border:1px solid var(--border); color:var(--ink);
  font-size:.78rem; font-weight:700; padding:8px 12px; border-radius:999px; cursor:pointer;
}
.lang-btn:hover{ border-color:var(--accent); }
.nav-toggle{
  display:none; background:none; border:1px solid var(--border); border-radius:10px;
  width:40px; height:40px; align-items:center; justify-content:center; cursor:pointer;
}
.mobile-nav{ display:none; }

@media (max-width:880px){
  .nav-links{ display:none; }
  .nav-toggle{ display:inline-flex; }
  .mobile-nav.open{
    display:flex; flex-direction:column; gap:2px; position:absolute; inset-inline:0; top:100%;
    background:var(--surface); border-bottom:1px solid var(--border); padding:10px 22px 16px;
    box-shadow:var(--shadow);
  }
  .mobile-nav a{ padding:10px 4px; font-weight:600; color:var(--ink); border-bottom:1px solid var(--border); font-size:.94rem; }
  .mobile-nav a:last-child{ border-bottom:none; }
  .site-header{ position:sticky; }
}

/* ---------- hero ---------- */
.hero{ padding-block:64px 56px; }
.hero-grid{ display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center; }
@media (max-width:900px){ .hero-grid{ grid-template-columns:1fr; } }
.hero h1{ font-size:clamp(2rem, 1.5rem + 2vw, 3.1rem); font-weight:700; line-height:1.2; margin-bottom:18px; }
.hero .lede{ font-size:1.08rem; line-height:1.85; color:var(--muted); max-width:52ch; margin-bottom:28px; }
.hero-ctas{ display:flex; flex-wrap:wrap; gap:12px; }

.hero-visual{
  aspect-ratio:1/.82; border-radius:22px; background:var(--surface-3); position:relative; overflow:hidden;
  border:1px solid var(--border-on-3);
}
.hero-visual svg{ width:100%; height:100%; display:block; }

/* ---------- section shells ---------- */
.section{ padding-block:64px; }
.section-tight{ padding-block:44px; }
.section-head{ max-width:60ch; margin-bottom:36px; }
.section-head h2{ font-size:clamp(1.5rem, 1.2rem + 1vw, 2.1rem); margin-bottom:12px; }
.section-head p{ color:var(--muted); font-size:1rem; }
.section-alt{ background:var(--surface-2); }

/* ---------- value props / feature grid ---------- */
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
@media (max-width:880px){ .grid-3, .grid-2{ grid-template-columns:1fr; } }

.card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:26px 24px;
}
.card-icon{
  width:44px; height:44px; border-radius:12px; background:var(--accent-soft);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.card h3{ font-size:1.06rem; margin-bottom:8px; }
.card p{ color:var(--muted); font-size:.92rem; }

.card-link{ display:block; transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.card-link:hover{ border-color:var(--accent); transform:translateY(-4px); box-shadow:var(--shadow); }
.card-more{
  display:inline-flex; align-items:center; gap:6px; margin-top:14px; font-size:.86rem;
  font-weight:700; color:var(--accent-ink);
}

/* ---------- steps ---------- */
.steps{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; counter-reset:step; }
@media (max-width:880px){ .steps{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .steps{ grid-template-columns:1fr; } }
.step{ position:relative; padding-inline-start:0; }
.step-num{
  font-family:'IBM Plex Sans Arabic',sans-serif; font-weight:700; font-size:1.6rem;
  color:var(--accent); margin-bottom:10px; font-variant-numeric:tabular-nums;
}
.step h4{ font-size:.98rem; margin-bottom:6px; }
.step p{ color:var(--muted); font-size:.86rem; line-height:1.75; }

/* ---------- spotlight (chickin) ---------- */
.spotlight{
  background:var(--surface-3); color:var(--ink-on-3); border-radius:24px;
  padding:44px; display:grid; grid-template-columns:1fr 1fr; gap:36px; align-items:center;
}
@media (max-width:880px){ .spotlight{ grid-template-columns:1fr; padding:30px 24px; } }
.spotlight h2, .spotlight p{ color:var(--ink-on-3); }
.spotlight .muted{ color:var(--muted-on-3); }
.spotlight-badge{
  display:inline-flex; align-items:center; gap:8px; background:rgba(47,198,172,.14);
  color:var(--accent-ink); border:1px solid rgba(47,198,172,.3);
  font-size:.76rem; font-weight:700; padding:6px 13px; border-radius:999px; margin-bottom:16px;
}
.spotlight-feats{ display:grid; gap:10px; margin-block:18px 22px; }
.spotlight-feats li{ display:flex; gap:10px; align-items:flex-start; list-style:none; font-size:.92rem; line-height:1.7; color:var(--ink-on-3); }
.spotlight-feats svg{ flex-shrink:0; margin-top:3px; }
.spotlight-visual{
  aspect-ratio:1/.85; border-radius:18px; background:rgba(255,255,255,.03);
  border:1px solid var(--border-on-3); overflow:hidden;
}
.spotlight-visual svg{ width:100%; height:100%; display:block; }

/* ---------- cta banner ---------- */
.cta-banner{
  background:linear-gradient(135deg, var(--surface-3), #0A1826 70%);
  border-radius:24px; padding:48px 40px; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:18px;
}
.cta-banner h2{ color:var(--ink-on-3); font-size:clamp(1.4rem,1.1rem + 1vw,2rem); max-width:32ch; }
.cta-banner p{ color:var(--muted-on-3); max-width:48ch; }

/* ---------- footer ---------- */
.site-footer{ border-top:1px solid var(--border); padding-block:48px 28px; background:var(--surface); }
.footer-grid{ display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr; gap:32px; margin-bottom:32px; }
@media (max-width:820px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
@media (max-width:520px){ .footer-grid{ grid-template-columns:1fr; } }
.footer-col h5{ font-size:.78rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin-bottom:14px; }
.footer-col ul{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.footer-col a{ font-size:.9rem; color:var(--ink); }
.footer-col a:hover{ color:var(--accent-ink); }
.footer-desc{ color:var(--muted); font-size:.9rem; line-height:1.8; max-width:32ch; margin-top:12px; }
.footer-bottom{
  border-top:1px solid var(--border); padding-top:22px; display:flex; flex-wrap:wrap;
  justify-content:space-between; gap:10px; color:var(--muted); font-size:.84rem;
}
.footer-bottom a{ color:var(--muted); }
.footer-bottom a:hover{ color:var(--accent-ink); }

/* ---------- misc ---------- */
.tag-row{ display:flex; flex-wrap:wrap; gap:10px; }
.pill{
  display:inline-flex; align-items:center; gap:7px; background:var(--surface-2); border:1px solid var(--border);
  color:var(--ink); font-size:.84rem; font-weight:600; padding:8px 14px; border-radius:999px;
}
.contact-card{
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
  padding:22px 24px; display:flex; align-items:center; gap:16px;
}
.contact-card .ico{
  width:46px; height:46px; border-radius:12px; background:var(--accent-soft); flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
}
.contact-card .label{ font-size:.78rem; color:var(--muted); font-weight:600; margin-bottom:3px; }
.contact-card .val{ font-size:1rem; font-weight:700; direction:ltr; text-align:start; unicode-bidi:isolate; }
[dir="rtl"] .contact-card .val{ font-family:'IBM Plex Sans Arabic',sans-serif; }

.check-list{ display:grid; gap:12px; margin:0; padding:0; list-style:none; }
.check-list li{ display:flex; gap:10px; align-items:flex-start; font-size:.94rem; line-height:1.75; color:var(--ink); }
.check-list svg{ flex-shrink:0; margin-top:4px; color:var(--accent); }

.page-hero{ padding-block:52px 20px; border-bottom:1px solid var(--border); margin-bottom:52px; }
.page-hero h1{ font-size:clamp(1.9rem, 1.5rem + 1.4vw, 2.6rem); margin-bottom:14px; }
.page-hero p{ color:var(--muted); font-size:1.02rem; max-width:56ch; }

/* ---------- resource / app rows (apps.html) ---------- */
.resource-card, .app-row{ transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.resource-card:hover, .app-row:hover{ border-color:var(--accent); transform:translateY(-4px); box-shadow:var(--shadow); }

/* ---------- scroll-reveal ---------- */
.reveal{
  opacity:0; transform:translateY(18px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.is-visible{ opacity:1; transform:translateY(0); }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .reveal{ transition:none !important; opacity:1 !important; transform:none !important; }
}

/* ---------- back to top ---------- */
.back-to-top{
  position:fixed; inset-inline-end:22px; bottom:22px; z-index:50;
  width:44px; height:44px; border-radius:50%; border:1px solid var(--border);
  background:var(--surface); color:var(--ink); box-shadow:var(--shadow);
  display:flex; align-items:center; justify-content:center; cursor:pointer; padding:0;
  opacity:0; visibility:hidden; transform:translateY(10px);
  transition:opacity .25s ease, transform .25s ease, visibility .25s ease, border-color .2s ease, color .2s ease;
}
.back-to-top.visible{ opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover{ border-color:var(--accent); color:var(--accent-ink); }
