:root {
  --ink: #111418;
  --ink-2: #1B1F25;
  --paper: #F6F5F2;
  --paper-2: #ECEAE4;
  --white: #FFFFFF;
  --green: #239E46;
  --green-hi: #2BB55A;
  --muted: #5B6068;
  --line: #DCD9D1;
  --radius: 18px;
  --wrap: 1200px;
  --ar: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --en: "Montserrat", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.has-intro body { overflow: hidden; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--ar); font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
html[lang="en"] body { font-family: var(--en); font-size: 16px; line-height: 1.7; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 700; }
em { font-style: normal; color: var(--green); }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip-link { position: fixed; inset-inline-start: 8px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 300; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #1d8a3c; }
.btn-line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.btn-ghost-light:hover { background: #fff; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }
.wa-ico { width: 18px; height: 18px; background: currentColor; flex: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.2-.4.3-.4.8-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7.5-.1 1.5-.6 1.7-1.2.2-.6.2-1.1.2-1.2-.1-.2-.2-.2-.4-.3z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2zm4.5-6.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1l-.8 1c-.1.2-.3.2-.5.1a6.7 6.7 0 0 1-3.3-2.9c-.2-.4.3-.4.8-1.3.1-.2 0-.3 0-.4l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7.5-.1 1.5-.6 1.7-1.2.2-.6.2-1.1.2-1.2-.1-.2-.2-.2-.4-.3z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* ---------- الشارات ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; line-height: 1.6; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-real { background: rgba(43,181,90,.14); color: var(--green); }
.featured .badge-real { color: var(--green-hi); background: rgba(43,181,90,.16); }
.badge-client { background: #E7EFE9; color: #1d6b35; }
.badge-demo { background: var(--paper-2); color: var(--muted); }

/* ---------- البداية ---------- */
#intro {
  position: fixed; inset: 0; z-index: 200; background: var(--ink); color: #fff;
  display: grid; place-items: center; transition: transform .7s var(--ease), opacity .7s;
}
html.no-intro #intro { display: none; }
#intro.is-done { transform: translateY(-100%); }
.intro-code {
  margin: 0; font: 500 clamp(16px, 2.2vw, 20px)/1.7 ui-monospace, "Cascadia Code", Consolas, monospace;
  color: #C9CED6; white-space: pre; transition: opacity .35s, transform .45s var(--ease); grid-area: 1 / 1;
  max-width: calc(100vw - 32px); overflow: hidden;
}
.intro-code .k { color: #7FB2FF; } .intro-code .s { color: var(--green-hi); } .intro-code .p { color: #fff; }
.caret { display: inline-block; width: .55em; height: 1.1em; background: var(--green-hi); vertical-align: -0.18em; margin-inline-start: 2px; animation: blink .8s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#intro.is-mark .intro-code { opacity: 0; transform: scale(.85); }
.intro-mark { grid-area: 1 / 1; width: min(240px, 50vw); opacity: 0; transform: scale(.9); transition: opacity .4s, transform .6s var(--ease); }
#intro.is-mark .intro-mark { opacity: 1; transform: none; }
.intro-mark .m-ring { stroke-dasharray: 271; stroke-dashoffset: 271; }
#intro.is-mark .m-ring { transition: stroke-dashoffset .7s var(--ease); stroke-dashoffset: 0; }
.intro-mark .m-slash { transform: translateY(-30px); opacity: 0; }
#intro.is-mark .m-slash { transition: transform .45s .35s var(--ease), opacity .3s .35s; transform: none; opacity: 1; }
.intro-mark .m-chev { transform: translateX(-24px); opacity: 0; }
#intro.is-mark .m-chev { transition: transform .45s .5s var(--ease), opacity .3s .5s; transform: none; opacity: 1; }
.intro-skip {
  position: absolute; bottom: max(24px, env(safe-area-inset-bottom)); inset-inline-end: 24px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff;
  border-radius: 999px; padding: 8px 18px; font-size: 14px;
}
.intro-skip:hover { background: rgba(255,255,255,.16); }

/* الصفحة تتبنى بعد البداية */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
body.is-ready .reveal { opacity: 1; transform: none; }
body.is-ready .reveal:nth-child(2) { transition-delay: .08s; }
body.is-ready .reveal:nth-child(3) { transition-delay: .16s; }
body.is-ready .reveal:nth-child(4) { transition-delay: .24s; }
body.is-ready .reveal:nth-child(5) { transition-delay: .32s; }
body.is-ready .hero-visual.reveal { transition-delay: .2s; }
.in-view { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.in-view.is-in { opacity: 1; transform: none; }

/* ---------- الهيدر ---------- */
.site-header { position: sticky; top: 0; z-index: 50; transition: background .3s, box-shadow .3s; }
.site-header.is-scrolled { background: rgba(246,245,242,.86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 44px; display: block; }
.brand-name { font-family: var(--en); font-weight: 700; font-size: 18px; letter-spacing: .12em; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn { font-family: var(--en); font-weight: 700; font-size: 14px; background: none; border: 1.5px solid var(--line); border-radius: 999px; min-width: 44px; height: 40px; }
.lang-btn:hover { border-color: var(--ink); }
.menu-btn { display: none; width: 44px; height: 40px; border: 0; background: none; position: relative; }
.menu-btn span { position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-btn span:first-child { top: 15px; } .menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- الواجهة ---------- */
.hero { padding: 48px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--muted); font-weight: 500; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(35,158,70,.18); }
.hero h1 { font-size: clamp(40px, 6.2vw, 76px); letter-spacing: -.01em; line-height: 1.12; }
html[lang="en"] .hero h1 { letter-spacing: -.025em; }
.hero h1 em { display: block; }
.lead { font-size: clamp(18px, 1.7vw, 21px); color: var(--muted); margin: 22px 0 32px; max-width: 34ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; padding: 0; margin: 40px 0 0; display: flex; gap: 32px; flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts b { font-family: var(--en); font-size: 26px; font-weight: 700; line-height: 1.2; }
.hero-facts span { color: var(--muted); font-size: 14px; }
.hero-visual { position: relative; aspect-ratio: 5 / 4; }
.hv-laptop { position: absolute; inset: 4% 0 14% 8%; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(17,20,24,.35), 0 0 0 1px rgba(17,20,24,.06); }
html[dir="ltr"] .hv-laptop { inset: 4% 8% 14% 0; }
.hv-bar, .laptop-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #EDEBE6; direction: ltr; }
.hv-bar i, .laptop-bar i { width: 9px; height: 9px; border-radius: 50%; background: #CFCBC2; }
.hv-bar span, .laptop-bar span { margin-inline: auto; font: 500 11px/1 var(--en); color: #7b7f86; background: #fff; padding: 4px 18px; border-radius: 6px; }
.hv-laptop img { width: 100%; height: calc(100% - 28px); object-fit: cover; object-position: top; }
.hv-phone { position: absolute; width: 30%; aspect-ratio: 390 / 844; bottom: 0; inset-inline-end: 0; border-radius: 26px; border: 7px solid var(--ink); overflow: hidden; background: var(--ink); box-shadow: 0 30px 50px -20px rgba(17,20,24,.5); transform: rotate(-3deg); }
html[dir="ltr"] .hv-phone { transform: rotate(3deg); }
.hv-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hv-tag { position: absolute; top: 0; inset-inline-start: 0; display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-hi); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(43,181,90,.6); } 70% { box-shadow: 0 0 0 10px rgba(43,181,90,0); } 100% { box-shadow: 0 0 0 0 rgba(43,181,90,0); } }

/* ---------- المشروع الرئيسي ---------- */
.featured { background: var(--ink); color: #fff; padding: 112px 0; border-radius: 40px 40px 0 0; overflow: hidden; }
.featured-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.featured h2 { font-size: clamp(34px, 4.5vw, 56px); margin: 18px 0 8px; }
.featured .muted { color: #9EA4AD; margin: 0 0 24px; }
.ticks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-inline-start: 30px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .4em; width: 7px; height: 13px; border-right: 2.5px solid var(--green-hi); border-bottom: 2.5px solid var(--green-hi); transform: rotate(45deg); }
.laptop { perspective: 1600px; }
.laptop-screen { background: #2a2f36; border-radius: 16px 16px 4px 4px; padding: 10px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.8); }
.laptop-screen .laptop-bar { border-radius: 8px 8px 0 0; background: #EDEBE6; }
.laptop-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; border-radius: 0 0 6px 6px; }
.laptop-view img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.laptop-view iframe { position: absolute; top: 0; left: 0; border: 0; width: 1440px; height: 900px; background: #fff; }
.laptop-base { height: 14px; margin: 0 -4%; background: linear-gradient(#3a4049, #20242a); border-radius: 0 0 18px 18px; }
.try-here { position: absolute; inset: auto auto 18px 50%; transform: translateX(-50%); background: var(--green); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font-weight: 600; box-shadow: 0 10px 30px -8px rgba(35,158,70,.7); transition: transform .2s var(--ease), background .2s; }
.try-here:hover { background: #1d8a3c; transform: translateX(-50%) translateY(-2px); }

/* ---------- الأقسام ---------- */
section { scroll-margin-top: 80px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker { margin: 0 0 12px; color: var(--green); font-weight: 600; font-size: 15px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 54px); }
.section-head .muted { margin: 16px 0 0; font-size: 18px; }

/* ---------- الأعمال ---------- */
.work { padding: 120px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.chip { border: 1.5px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 18px; font-weight: 500; transition: all .2s; }
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.work-grid { display: grid; grid-template-columns: 360px 1fr; gap: 56px; align-items: start; }
.viewer-col { position: sticky; top: 96px; }
.phone { --w: 330px; width: var(--w); height: calc(var(--w) * 2.05); margin-inline: auto; background: var(--ink); border-radius: 52px; padding: 12px; position: relative; box-shadow: 0 50px 90px -40px rgba(17,20,24,.6), inset 0 0 0 2px #2d333b; }
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; background: #000; border-radius: 20px; z-index: 3; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: #fff; direction: ltr; }
.phone-screen iframe { position: absolute; top: 0; left: 0; border: 0; width: 390px; background: #fff; }
.phone-poster { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .4s; }
.phone-loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.6); opacity: 0; pointer-events: none; transition: opacity .3s; }
.phone-loading span { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--paper-2); border-top-color: var(--green); animation: spin .8s linear infinite; }
.phone.is-loading .phone-loading { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-meta { text-align: center; margin-top: 18px; }
.viewer-name { margin: 0; font-weight: 700; }
.viewer-open { color: var(--muted); font-size: 14px; text-decoration: none; }
.viewer-open:hover { color: var(--green); }

.cards { display: grid; gap: 18px; }
.card { display: grid; grid-template-columns: 220px 1fr; gap: 24px; background: #fff; border-radius: var(--radius); padding: 18px; border: 1.5px solid transparent; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.card:hover { box-shadow: 0 20px 40px -24px rgba(17,20,24,.35); }
.card.is-active { border-color: var(--green); }
.card[hidden] { display: none; }
.card-thumb { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 11; background: var(--paper-2); border: 0; padding: 0; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--ease); }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; min-width: 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-type { color: var(--muted); font-size: 14px; }
.card h3 { font-size: 22px; margin: 8px 0 6px; }
.card ul { margin: 4px 0 16px; padding-inline-start: 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions .btn { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- اللي يميزني ---------- */
.why { padding: 120px 0; background: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.why-grid article { padding: 32px 28px 36px; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); transition: background .3s; }
.why-grid article:nth-child(3n) { border-inline-end: 0; }
.why-grid article:hover { background: var(--paper); }
.num { font-family: var(--en); font-weight: 700; color: var(--green); font-size: 14px; letter-spacing: .1em; }
.why-grid h3 { font-size: 21px; margin: 14px 0 10px; }
.why-grid p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- الخدمات ---------- */
.services { padding: 120px 0; }
.srv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.srv { background: #fff; border-radius: var(--radius); padding: 28px; transition: transform .3s var(--ease), box-shadow .3s; }
.srv:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(17,20,24,.4); }
.srv-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; margin-bottom: 18px; }
.srv-ico svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.srv h3 { font-size: 20px; margin-bottom: 8px; }
.srv p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- كيف نخدمك ---------- */
.how { padding: 120px 0; background: var(--paper-2); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { position: relative; background: var(--paper); border-radius: var(--radius); padding: 32px 28px; }
.step-n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font: 700 18px/1 var(--en); margin-bottom: 20px; }
.steps h3 { font-size: 21px; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--muted); }
.how-cta { margin-top: 40px; }

/* ---------- آراء الزبائن ---------- */
.words { padding: 120px 0 80px; }
.words .section-head { margin-bottom: 32px; }
.words-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.quote { margin: 0; background: #fff; border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.quote blockquote { margin: 0; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.75; font-weight: 500; }
.quote figcaption { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 16px; }
.quote figcaption span { color: var(--muted); font-size: 15px; }

/* ---------- من أنا ---------- */
.about { padding: 80px 0 120px; }
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; }
.about-mark { aspect-ratio: 1; background: var(--ink); border-radius: 32px; display: grid; place-items: center; padding: 22%; }
.about h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 16px; }
.about-text { font-size: 19px; max-width: 60ch; margin: 0 0 24px; }
.about-meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.about-meta li { display: flex; flex-direction: column; }
.about-meta span { color: var(--muted); font-size: 14px; }
.about-meta a { text-decoration: none; }
.about-meta a:hover { color: var(--green); }

/* ---------- التواصل ---------- */
.contact { background: var(--ink); color: #fff; padding: 128px 0; text-align: center; border-radius: 40px 40px 0 0; }
.contact h2 { font-size: clamp(38px, 6vw, 80px); line-height: 1.12; }
.contact h2 em { color: var(--green-hi); }
.contact p { color: #9EA4AD; font-size: 19px; margin: 20px auto 40px; max-width: 40ch; }

/* ---------- الفوتر ---------- */
.site-footer { background: var(--ink); color: #9EA4AD; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid #23282f; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand-light { color: #fff; }
.footer-note, .footer-copy { margin: 0; font-size: 14px; }
.footer-copy { font-family: var(--en); }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #2f353d; display: grid; place-items: center; color: #fff; text-decoration: none; font: 700 13px var(--en); }
.socials a:hover { background: var(--green); border-color: var(--green); }

/* ---------- العارض والنافذة ---------- */
.viewer { position: fixed; inset: 0; z-index: 150; background: var(--ink); display: flex; flex-direction: column; }
.viewer[hidden], .modal[hidden] { display: none; }
.viewer-top { display: flex; align-items: center; gap: 12px; padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top)); color: #fff; }
.viewer-top p { flex: 1; margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-ext { color: #fff; background: var(--green); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.viewer-body { flex: 1; background: #fff; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; display: block; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font-size: 16px; }
.modal { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,20,24,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-card { position: relative; width: min(760px, 100%); max-height: calc(100dvh - 40px); overflow: auto; background: var(--paper); border-radius: 24px; animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } }
.modal-x { position: absolute; top: 14px; inset-inline-end: 14px; background: rgba(17,20,24,.7); z-index: 2; }
.modal-img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: top; }
.modal-body { padding: 28px 32px 32px; }
.modal-body h3 { font-size: 30px; margin: 14px 0 4px; }
.modal-body .muted { margin: 0 0 14px; }
.modal-body h4 { font-size: 17px; margin: 24px 0 12px; }
.modal-body .ticks { margin-bottom: 20px; }
.modal-body .ticks li::before { border-color: var(--green); }
.tech { font: 500 14px var(--en); color: var(--muted); direction: ltr; text-align: start; margin: 0 0 24px; }
html[dir="rtl"] .tech { text-align: right; }

/* ---------- الشاشات الصغيرة ---------- */
@media (max-width: 1024px) {
  .hero-grid, .featured-grid { grid-template-columns: 1fr; gap: 48px; }
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .cards-wrap { min-width: 0; }
  .viewer-col { display: none; }
  .why-grid, .srv-grid { grid-template-columns: 1fr 1fr; }
  .why-grid article:nth-child(3n) { border-inline-end: 1px solid var(--line); }
  .why-grid article:nth-child(2n) { border-inline-end: 0; }
}
@media (max-width: 820px) {
  .nav { position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0; background: var(--paper); padding: 8px 20px 20px; box-shadow: 0 20px 30px -20px rgba(0,0,0,.25); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: all .25s var(--ease); }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 18px; color: var(--ink); }
  .menu-btn { display: block; }
  .header-actions .btn-sm span[data-i18n] { display: none; }
  .header-actions .btn-sm { width: 40px; padding: 0; }
  .site-header { background: rgba(246,245,242,.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .steps, .words-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-mark { width: 160px; border-radius: 28px; }
  .card { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 32px); }
  .hero { padding: 24px 0 72px; }
  .hero-facts { gap: 22px; }
  .hero-facts b { font-size: 22px; }
  .featured, .contact { border-radius: 28px 28px 0 0; padding: 80px 0; }
  .work, .why, .services, .how, .words { padding: 80px 0; }
  .why-grid, .srv-grid { grid-template-columns: 1fr; }
  .why-grid article { border-inline-end: 0 !important; padding: 26px 4px; }
  .hero-cta .btn, .how-cta .btn, .contact .btn { width: 100%; }
  .btn-row .btn { flex: 1 1 auto; }
  .modal { padding: 0; align-items: end; }
  .modal-card { border-radius: 24px 24px 0 0; max-height: 92dvh; }
  .modal-body { padding: 22px 20px 28px; }
  .try-here { bottom: 12px; padding: 10px 18px; font-size: 14px; }
  .quote { padding: 26px; }
}
/* ---------- العارض الكامل: صورة وتحميل وبديل ---------- */
.viewer-head { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.viewer-head p { margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-count { font: 500 12px/1.4 var(--en); color: #9EA4AD; align-self: flex-start; }
.viewer-ext { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px; white-space: nowrap; }
.viewer-body { position: relative; overflow: hidden; }
.viewer-body iframe { position: relative; z-index: 1; transition: opacity .35s; }
.viewer-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .35s; }
.viewer-loading, .viewer-slow { position: absolute; z-index: 3; inset-inline: 16px; display: none; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.viewer-loading { bottom: 24px; }
.viewer-loading p { margin: 0; background: rgba(17,20,24,.82); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 15px; }
.spin { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); border-top-color: var(--green); animation: spin .8s linear infinite; background: rgba(17,20,24,.5); }
.viewer-slow { top: 50%; transform: translateY(-50%); background: var(--ink); color: #fff; padding: 22px 20px; border-radius: 20px; box-shadow: 0 20px 50px -10px rgba(0,0,0,.6); }
.viewer-slow p { margin: 0; font-size: 16px; }
.viewer-body.is-loading iframe { opacity: 0; }
.viewer-body.is-loading .viewer-poster { opacity: 1; z-index: 2; }
.viewer-body.is-loading .viewer-loading { display: flex; }
.viewer-body.is-slow .viewer-loading { display: none; }
.viewer-body.is-slow .viewer-slow { display: flex; }
.viewer-nav { display: flex; align-items: center; gap: 8px; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: var(--ink); }
.viewer-nav .btn { flex: 1; min-height: 48px; padding: 0 12px; font-size: 15px; }
.vnav { flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; font-size: 15px; font-weight: 600; }
.vnav-ar { width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
html[dir="ltr"] .vnav-ar { transform: rotate(-135deg); }
html[dir="ltr"] .vnav-next .vnav-ar { transform: rotate(45deg); }
html[dir="rtl"] .vnav-next .vnav-ar { transform: rotate(-135deg); }

/* ---------- مهمة "جرّب" ---------- */
.task-ico { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--green); position: relative; }
.task-ico::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--green); }
.vm-task { display: flex; gap: 8px; align-items: flex-start; text-align: start; margin: 10px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); background: #fff; border-radius: 14px; padding: 10px 12px; }
.vm-task .task-ico { margin-top: 3px; }
.vm-task b, .viewer-task b { color: var(--green); }
.viewer-task { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; padding-inline: 14px 8px; background: #1c2128; color: #fff; font-size: 15px; line-height: 1.5; }
.viewer-task[hidden] { display: none; }
.viewer-task p { flex: 1; margin: 0; }
.viewer-task b { color: var(--green-hi); }
.viewer-task .task-ico { border-color: var(--green-hi); }
.viewer-task .task-ico::after { background: var(--green-hi); }
.task-x { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; font-size: 13px; }

/* ---------- QR ---------- */
.vm-qr { display: flex; align-items: center; gap: 12px; margin-top: 10px; text-align: start; background: #fff; border-radius: 14px; padding: 8px; }
.vm-qr img { flex: none; width: 76px; height: 76px; border-radius: 8px; }
.vm-qr p { margin: 0 0 2px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.viewer-meta { text-align: center; }
.viewer-meta .viewer-name { margin-top: 2px; }

/* ---------- زر تبديل الجهاز ---------- */
.dev-switch { display: flex; gap: 4px; padding: 4px; margin: 0 auto 16px; width: max-content; background: #fff; border-radius: 999px; box-shadow: 0 0 0 1px var(--line); }
.dev-switch button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.dev-switch button:hover { color: var(--ink); }
.dev-switch button.is-on { background: var(--ink); color: #fff; }
.dev-ico { width: 14px; height: 14px; border: 1.8px solid currentColor; border-radius: 3px; }
.dev-ico-phone { width: 9px; border-radius: 2.5px; }
.dev-ico-tablet { width: 12px; }
.dev-ico-laptop { width: 16px; height: 11px; border-radius: 2px; box-shadow: 0 3px 0 -1px currentColor; }

/* التليفون يصغر شوية لو الشاشة قصيرة باش يدخل كامل */
.phone { --w: clamp(190px, calc((100vh - 410px) / 2.05), 310px); }
.viewer-col { top: 84px; }
@media (max-height: 760px) { .vm-qr p { display: none; } .vm-qr img { width: 60px; height: 60px; } .dev-switch { margin-bottom: 10px; } }

/* ---------- الجهاز يتبدل في مكانه (نقال، تابلت، كمبيوتر) ---------- */
.phone { transition: width .6s var(--ease), height .6s var(--ease), border-radius .6s var(--ease), padding .6s var(--ease), margin .6s var(--ease); }
.phone-screen { transition: border-radius .6s var(--ease); }
.phone-notch { transition: opacity .3s; }
.phone:not([data-mode="phone"]) .phone-notch { opacity: 0; }
.phone[data-mode="tablet"] { border-radius: 36px; }
.phone[data-mode="tablet"] .phone-screen { border-radius: 20px; }
.phone[data-mode="laptop"] { border-radius: 16px 16px 6px 6px; margin-bottom: 18px; }
.phone[data-mode="laptop"] .phone-screen { border-radius: 6px; }
.phone::after { content: ""; position: absolute; left: -7%; right: -7%; bottom: -18px; height: 18px; background: linear-gradient(#3a4049, #1a1e23); border-radius: 0 0 20px 20px; opacity: 0; transform: scaleX(.6); transition: opacity .4s, transform .6s var(--ease); pointer-events: none; }
.phone[data-mode="laptop"]::after { opacity: 1; transform: none; }
.work-grid.is-wide { grid-template-columns: minmax(0, 1fr); gap: 48px; }
.work-grid.is-wide .viewer-col { position: static; }
.work-grid.is-wide .viewer-meta { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: stretch; max-width: 900px; margin: 28px auto 0; }
.work-grid.is-wide .viewer-name { grid-column: 1 / -1; font-size: 20px; }
.work-grid.is-wide .vm-task, .work-grid.is-wide .vm-qr { margin: 0; }
.work-grid.is-wide .vm-qr p { max-width: 26ch; }
.work-grid.is-wide .cards { grid-template-columns: 1fr 1fr; animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ---------- الشريط الثابت تحت ---------- */
.mbar { display: none; }
.cards-dots { display: none; }
.thumb-try { display: none; }

/* ---------- النقال والتابلت ---------- */
@media (max-width: 1024px) {
  /* الواجهة تبان طول من غير انتظار */
  .reveal, body.is-ready .reveal { opacity: 1; transform: none; transition: none; }
  .in-view { transform: translateY(12px); transition-duration: .45s; }

  /* المقدمة: اللوقو بس وزر تخطي واضح */
  #intro.is-quick .intro-code { display: none; }
  .intro-skip { top: max(16px, env(safe-area-inset-top)); bottom: auto; min-height: 44px; padding: 0 22px; font-size: 15px; font-weight: 600; background: rgba(255,255,255,.14); }

  /* أزرار بحجم الصبع */
  .lang-btn, .menu-btn { height: 44px; min-width: 44px; }
  .header-actions .btn-sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; flex: none; }

  /* التصنيفات تتسحب بالصبع */
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding: 2px 20px 4px; margin-bottom: 20px; scroll-snap-type: x proximity; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 44px; padding: 0 20px; font-size: 16px; scroll-snap-align: start; white-space: nowrap; }

  /* المشاريع كروت تتسحب يمين ويسار */
  .cards { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -20px; padding: 4px 20px 8px; scroll-padding-inline: 20px; overscroll-behavior-x: contain; }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 min(86%, 420px); scroll-snap-align: start; display: flex; flex-direction: column; gap: 16px; padding: 12px 12px 16px; box-shadow: 0 10px 30px -22px rgba(17,20,24,.5); }
  .card.is-active { border-color: transparent; }
  .card-thumb { aspect-ratio: 4 / 3.4; }
  .card-thumb picture, .card-thumb img { width: 100%; height: 100%; }
  .thumb-try { display: inline-flex; align-items: center; gap: 6px; position: absolute; bottom: 12px; inset-inline-start: 12px; background: rgba(17,20,24,.85); color: #fff; font-size: 14px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
  .thumb-try::before { content: ""; width: 0; height: 0; border-block: 5px solid transparent; border-inline-start: 8px solid var(--green-hi); }
  .card-body { padding-inline: 6px; }
  .card h3 { font-size: 22px; }
  .card-type { font-size: 15px; }
  .card ul { font-size: 16px; }
  .card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .card-actions .btn { min-height: 46px; font-size: 15px; padding: 0 10px; }
  .card-actions .btn:first-child { grid-column: 1 / -1; min-height: 52px; font-size: 17px; background: var(--green); }
  .cards-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
  .cards-dots i { width: 7px; height: 7px; border-radius: 999px; background: var(--line); transition: width .25s var(--ease), background .25s; }
  .cards-dots i.is-on { width: 22px; background: var(--green); }

  /* "جرّبه هنا" في المشروع الرئيسي أكبر */
  .try-here { min-height: 48px; font-size: 16px; }

  /* الشريط الثابت */
  .mbar { display: flex; gap: 10px; position: fixed; z-index: 60; inset-inline: 0; bottom: 0; padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: rgba(246,245,242,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--line); transform: translateY(110%); transition: transform .3s var(--ease); }
  .mbar.is-on { transform: none; }
  .mbar .btn { flex: 1; min-height: 50px; font-size: 16px; }
  .mbar .btn-green { flex: 0 0 auto; padding: 0 22px; }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 600px) {
  .filters, .cards { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal, .in-view { opacity: 1; transform: none; }
}

/* الشعار يعبّي مكانه في كل المتصفحات (سفاري في الآيفون كان يخليه فاضي) */
[data-mark] svg { display: block; width: 100%; height: auto; }
.about-mark { display: flex; align-items: center; justify-content: center; }
.about-mark { padding: 0; }
.about-mark > svg { flex: none; width: 56%; }
