/* =========================================================
   نيبوكود — أنماط الموقع (عربي + إنجليزي + صفحات السياسات)
   الفكرة: الشعار حرف «ن» بالخط الكوفي المربّع المبني على شبكة،
   وكل عناصر الموقع تُبنى من نفس الخلايا المربعة: الشعار، رمز QR في
   فاتورة برنك، مسار المندوب في هلا جو، وأيقونات الخدمات.
   الاتجاه: خصائص منطقية (inline-start/end) تعمل للعربي والإنجليزي.
   ========================================================= */

:root {
    --ink: #0E1A33;
    --ink-2: #3A4762;
    --ink-3: #6A7690;
    --page: #F5F7FB;
    --paper: #FFFFFF;
    --line: #DFE4EE;
    --line-2: #CBD3E1;
    --cobalt: #2443C9;
    --cobalt-2: #1B35A6;
    --cobalt-soft: #E8ECFB;
    --saffron: #F2B33D;
    --saffron-2: #C98612;
    --saffron-soft: #FDF2DA;
    --green: #139A5B;
    --green-2: #0E7A47;
    --green-soft: #E1F3E9;
    --display: "Reem Kufi", "Alexandria", sans-serif;
    --body: "Alexandria", "Segoe UI", Tahoma, sans-serif;
    --r: 24px;
    --r-sm: 12px;
    --wrap: 1200px;
    --gutter: 24px;

    /* متغيرات محفوظة من النسخ السابقة (لا تحذفها) */
    --cobalt-deep: var(--cobalt-2);
    --wa: var(--green);
    --bg: var(--page);
    --bg-color: var(--page);
    --surface: var(--paper);
    --surface-2: #F6F8FB;
    --text: var(--ink);
    --text-light: var(--ink);
    --muted: var(--ink-2);
    --text-muted: var(--ink-2);
    --primary: var(--cobalt);
    --secondary: var(--cobalt);
    --accent: var(--wa);
    --radius: 14px;
    --radius-sm: 10px;
    --container: var(--wrap);
    --glass-bg: var(--paper);
    --glass-border: var(--line);
    --neon-glow: none;
    --line-strong: var(--line-2);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3 { font-weight: 700; }
:focus-visible { outline: 3px solid rgba(36, 67, 201, .45); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--cobalt-soft); }

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.nowrap { white-space: nowrap; }
/* أسطر العناوين متوازنة الطول (بدون كلمة يتيمة في السطر الأخير) */
.hero h1, .block-head h2, .contact-band h2, .product-kind, .section-title { text-wrap: balance; }
.wrap, .container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* رابط «تخطَّ إلى المحتوى» يظهر فقط عند التنقل بلوحة المفاتيح */
.skip { position: fixed; top: 10px; inset-inline-start: 10px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; transform: translateY(-160%); transition: transform .15s; }
.skip:focus { transform: none; }

/* ---------------- الأزرار ---------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; padding: 0 26px; border-radius: 12px; border: 1px solid transparent;
    font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-sm { height: 42px; padding: 0 18px; font-size: .95rem; border-radius: 10px; }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-2); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-wa { background: var(--green); color: #fff; }            /* من النسخة السابقة */
.btn-wa:hover { background: var(--green-2); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #E9EDF7; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { border-color: #fff; }

/* ---------------- الهيدر ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(245, 247, 251, .88);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, .95); }
.nav { height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--body); font-size: 1.22rem; font-weight: 700; letter-spacing: -.3px; direction: ltr; }
.brand-mark { display: none; }   /* محفوظ من النسخة السابقة */
.brand-text small { font-size: .78rem; color: var(--ink-3); }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: .97rem; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: rgba(14, 26, 51, .05); }
.nav-cta { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; align-items: center; height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--ink); }
.lang:hover { border-color: var(--ink-3); }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); font-size: 1.25rem; color: var(--ink); cursor: pointer; }
.menu-btn svg { fill: currentColor; }
.menu-btn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- الشاشة الرئيسية ---------------- */
.hero { position: relative; padding: 64px 0 104px; overflow: hidden; }
.hero::before {
    /* ورق مربعات خفيف: نفس الشبكة التي يُرسم عليها الحرف الكوفي */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(14, 26, 51, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 26, 51, .05) 1px, transparent 1px);
    background-size: 44px 44px; background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 64px; align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.5rem, 1.3rem + 4.1vw, 4.6rem); line-height: 1.2; margin-bottom: 26px; }
.hero .lead { font-size: clamp(1.06rem, 1rem + .35vw, 1.24rem); color: var(--ink-2); line-height: 1.95; max-width: 34em; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.hero-products { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 34em; }
.hero-products > span { color: var(--ink-3); font-size: .92rem; }
.hero-products a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .98rem; }
.hero-products a:hover { color: var(--cobalt); }
.sq { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; background: var(--pc, var(--cobalt)); }
.pc-brinq { --pc: var(--saffron); }
.pc-hala { --pc: var(--green); }
.pc-msg { --pc: var(--cobalt); }

/* الحرف الكوفي «ن» على شبكة 8×8 — يُرسم بالترتيب عند فتح الصفحة (site.js) */
.kufic { position: relative; }
.kufic-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: 0 30px 70px rgba(14, 26, 51, .10); }
.kufic-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; aspect-ratio: 1; max-width: 460px; margin-inline: auto; }
.kufic-grid i { display: block; border-radius: 4px; background: #EFF2F7; }
.kufic-grid i.on { background: var(--cobalt); }
.kufic-grid i.dot { background: var(--saffron); }
.kufic-caption { max-width: 440px; margin: 16px auto 0; font-size: .88rem; color: var(--ink-3); line-height: 1.8; }
.kufic-grid.animate i.on, .kufic-grid.animate i.dot { animation: fill .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes fill { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------- بيانات المنشأة ---------------- */
.facts { background: var(--paper); border-block: 1px solid var(--line); }
.facts dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts dl > div { padding: 26px 24px; border-inline-start: 1px solid var(--line); }
.facts dl > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.facts dt { font-size: .86rem; color: var(--ink-3); margin-bottom: 4px; }
.facts dd { font-weight: 600; font-size: 1.06rem; line-height: 1.5; }
.facts dd .ltr { font-size: .92rem; color: var(--ink-2); font-weight: 500; }

/* ---------------- رؤوس الأقسام ---------------- */
.block { padding: 112px 0; }
.block-head { max-width: 760px; margin-bottom: 52px; }
.block-head h2, .section-title { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 1.3rem + 2.1vw, 3rem); line-height: 1.25; margin-bottom: 16px; }
.block-head p { font-size: 1.12rem; color: var(--ink-2); line-height: 1.9; }

/* ---------------- المنتجات ---------------- */

.product {
    --pc: var(--cobalt); --pc-2: var(--cobalt-2); --ps: var(--cobalt-soft); --pt: var(--cobalt);
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
    background: var(--paper); border: 1px solid var(--line); border-radius: 30px; overflow: hidden;
}
.product + .product { margin-top: 28px; }
.product.p-brinq { --pc: var(--saffron); --pc-2: var(--saffron-2); --ps: var(--saffron-soft); --pt: #9A6400; }
.product.p-hala { --pc: var(--green); --pc-2: var(--green-2); --ps: var(--green-soft); --pt: var(--green-2); }
.product.flip .product-copy { order: 2; }
.product-copy { display: flex; flex-direction: column; padding: 52px 52px 48px; }
.product-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; }
.product-name h3 { font-family: var(--display); font-size: clamp(2.1rem, 1.6rem + 1.4vw, 2.8rem); line-height: 1.15; }
.product-name .domain { color: var(--ink-3); font-size: .98rem; font-weight: 500; }
.product-kind { color: var(--pt); font-weight: 600; font-size: 1.04rem; margin-bottom: 18px; }
.product-desc { color: var(--ink-2); font-size: 1.05rem; line-height: 1.9; margin-bottom: 24px; max-width: 32em; }
.product-points { display: grid; gap: 11px; }
.product-points li { position: relative; padding-inline-start: 26px; line-height: 1.7; }
.product-points li::before { content: ""; position: absolute; inset-inline-start: 0; top: .66em; width: 10px; height: 10px; border-radius: 2px; background: var(--pc); }
.product-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 32px; }
.btn-product { background: var(--pc); color: #fff; }
.btn-product:hover { background: var(--pc-2); }
.p-brinq .btn-product { color: #2B1C00; }
.p-brinq .btn-product:hover { background: #E6A529; }
.store-links { display: flex; flex-wrap: wrap; gap: 8px; }
.store-links a { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 10px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.store-links a:hover { border-color: var(--ink-3); }
.product-note { margin-top: 16px; color: var(--ink-3); font-size: .9rem; }
.product-note a { color: var(--pt); font-weight: 600; }
.product-note a:hover { text-decoration: underline; text-underline-offset: 3px; }

.product-visual { position: relative; display: grid; place-items: center; min-height: 500px; padding: 44px 36px; background: var(--ps); overflow: hidden; }
.product-visual::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(14, 26, 51, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 26, 51, .05) 1px, transparent 1px);
    background-size: 28px 28px;
}
.product-visual > * { position: relative; }
.v-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(14, 26, 51, .14); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.v-chip i { width: 9px; height: 9px; border-radius: 2px; background: var(--pc); flex-shrink: 0; }

/* -- برنك: فاتورة حرارية برمز QR حقيقي (يفتح brinq.cloud) -- */
.receipt {
    position: relative; width: min(100%, 330px); background: #fff; padding: 26px 24px 30px; margin-bottom: 10px; color: var(--ink);
    border-radius: 6px 6px 0 0;
    /* الظل يتبع شكل الفاتورة مع أسنانها (drop-shadow بدل box-shadow) */
    filter: drop-shadow(0 20px 28px rgba(14, 26, 51, .14));
    font-variant-numeric: tabular-nums;
}
/* الحافة السفلية المسننة للفاتورة الحرارية */
.receipt::after {
    content: ""; position: absolute; inset-inline: 0; top: 100%; height: 10px;
    background: conic-gradient(from -45deg at 50% 100%, transparent 0deg, #fff 1deg, #fff 89deg, transparent 90deg) 0 0 / 20px 10px repeat-x;
}
.rc-head { text-align: center; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1.5px dashed var(--line-2); line-height: 1.5; }
.rc-head b { display: block; font-family: var(--display); font-size: 1.25rem; }
.rc-head small { display: block; color: var(--ink-3); font-size: .78rem; }
.rc-items { display: grid; gap: 7px; font-size: .88rem; padding-bottom: 14px; margin-bottom: 12px; border-bottom: 1.5px dashed var(--line-2); }
.rc-items li, .rc-sum li { display: flex; justify-content: space-between; gap: 12px; }
.rc-sum { display: grid; gap: 5px; font-size: .84rem; color: var(--ink-2); margin-bottom: 14px; }
.rc-sum li.total { margin-top: 6px; padding-top: 8px; border-top: 1.5px dashed var(--line-2); color: var(--ink); font-size: 1rem; font-weight: 700; }
.rc-foot { display: flex; align-items: center; gap: 12px; }
.rc-foot .qr { width: 100px; height: 100px; flex-shrink: 0; }
.rc-foot p { font-size: .76rem; color: var(--ink-3); line-height: 1.6; }
.rc-foot p b { display: block; color: var(--ink); font-size: .82rem; margin-bottom: 2px; }

/* الشرائح العائمة مربوطة بالمعاينة نفسها (v-stage) وتتداخل مع حوافها فقط، فلا تغطي محتواها */
.v-stage { position: relative; width: 100%; display: grid; justify-items: center; }
.v-receipt { max-width: 330px; }
.v-inbox { max-width: 440px; }
.v-stage .receipt, .v-stage .inbox { width: 100%; }
.v-stage .chip-a { top: -24px; inset-inline-end: -36px; }
.v-stage .chip-b { bottom: -18px; inset-inline-start: -36px; }
.v-inbox .chip-a { top: -30px; inset-inline-end: 24px; }
.v-inbox .chip-b { inset-inline: 0; margin-inline: auto; width: max-content; }

/* -- هلا جو: مسار المندوب على شبكة مربعات -- */
.route { width: min(100%, 420px); display: grid; gap: 16px; }
.map { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; padding: 16px; background: #fff; border-radius: 20px; box-shadow: 0 24px 50px rgba(14, 26, 51, .12); }
.map i { aspect-ratio: 1; border-radius: 3px; background: #EDF1EE; }
.map i.road { background: #DCE8E0; }
.map i.done { background: var(--green); }
.map i.next { background: #9AD6B5; }
.map i.store { background: var(--ink); border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.map i.home { background: var(--saffron); border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--saffron); }
.map i.rider { background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(19, 154, 91, .35); }
.track { background: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: 0 24px 50px rgba(14, 26, 51, .12); }
.track-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; margin-bottom: 14px; }
.track-head b { font-size: 1.02rem; white-space: nowrap; }
.track-head span { color: var(--green-2); font-weight: 700; font-size: .92rem; white-space: nowrap; }
.track-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.track-steps li { display: flex; flex-direction: column; gap: 8px; font-size: .76rem; color: var(--ink-3); line-height: 1.4; }
.track-steps li::before { content: ""; height: 6px; border-radius: 3px; background: #E3E8EF; }
.track-steps li.done::before { background: var(--green); }
.track-steps li.cur { color: var(--ink); font-weight: 600; }
.track-steps li.cur::before { background: linear-gradient(90deg, var(--green) 55%, #E3E8EF 55%); }
[dir="rtl"] .track-steps li.cur::before { background: linear-gradient(270deg, var(--green) 55%, #E3E8EF 55%); }

/* -- نيبوكود للمراسلة: صندوق محادثات مشترك -- */
.inbox { width: min(100%, 440px); background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px rgba(14, 26, 51, .16); font-size: .86rem; }
.ib-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ib-top b { font-family: var(--display); font-size: 1.05rem; }
.ib-tabs { display: flex; gap: 6px; }
.ib-tabs span { padding: 4px 10px; border-radius: 999px; background: #F1F4F9; color: var(--ink-2); font-size: .74rem; font-weight: 600; white-space: nowrap; }
.ib-tabs span.on { background: var(--ink); color: #fff; }
.ib-thread { padding: 16px 18px 18px; background: #EFE7DD; display: grid; gap: 9px; }
.ib-who { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ib-who b { font-size: .92rem; }
.ib-who span { padding: 3px 10px; border-radius: 999px; background: var(--cobalt-soft); color: var(--cobalt); font-weight: 700; font-size: .74rem; white-space: nowrap; }
.bub { max-width: 82%; padding: 9px 12px 6px; border-radius: 14px; background: #fff; line-height: 1.6; box-shadow: 0 1px 1px rgba(14, 26, 51, .07); }
.bub small { display: block; text-align: end; font-size: .68rem; color: #8B96AA; margin-top: 2px; }
.bub.in { justify-self: start; border-start-start-radius: 4px; }
.bub.out { justify-self: end; background: #D9FDD3; border-start-end-radius: 4px; }
.bub.sys { justify-self: center; max-width: 92%; background: #FFF6DB; border: 1px dashed #E9C26B; color: #6B4E00; box-shadow: none; font-size: .8rem; }
.ib-compose { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); color: var(--ink-3); }
.ib-compose span { flex: 1; }
.ib-compose i { width: 32px; height: 32px; border-radius: 50%; background: var(--cobalt); flex-shrink: 0; }

/* ---------------- الخدمات ---------------- */
.services-sec { background: var(--paper); border-block: 1px solid var(--line); }
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 48px; }
.services li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 18px; align-items: start; }
.services .glyph { grid-row: span 2; width: 44px; height: 44px; }
.services .glyph rect { fill: #E3E8F2; }
.services .glyph rect.on { fill: var(--cobalt); }
.services .glyph rect.dot { fill: var(--saffron); }
.services h3 { font-size: 1.16rem; font-weight: 700; line-height: 1.5; padding-top: 2px; }
.services p { color: var(--ink-2); line-height: 1.85; }
.integrations { margin-top: 64px; padding-top: 36px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 2.1fr); gap: 28px; align-items: start; }
.integrations h3 { font-size: 1.12rem; line-height: 1.6; }
.integrations h3 small { display: block; font-weight: 400; font-size: .92rem; color: var(--ink-3); margin-top: 4px; }
.integrations ul { display: flex; flex-wrap: wrap; gap: 10px; }
.integrations li { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; background: var(--page); border: 1px solid var(--line); font-weight: 500; font-size: .95rem; }
.integrations li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--cobalt); flex-shrink: 0; }

/* ---------------- طريقة العمل ---------------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: st; }
.step { position: relative; counter-increment: st; }
.step::before {
    content: counter(st); display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px;
    border-radius: 10px; background: var(--ink); color: #fff; font-family: var(--display); font-size: 1.35rem; font-weight: 700;
}
.step:not(:last-child)::after { content: ""; position: absolute; top: 23px; inset-inline-start: 64px; inset-inline-end: -14px; height: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 12px); }
.step h3, .step h4 { font-size: 1.14rem; margin-bottom: 8px; }
.step p { color: var(--ink-2); line-height: 1.85; }
.stack { margin-top: 56px; color: var(--ink-2); font-size: .98rem; line-height: 1.9; }
.stack b { color: var(--ink); margin-inline-end: 6px; }

/* ---------------- التواصل ---------------- */
.contact-sec { padding: 0 0 112px; }
.contact-band {
    position: relative; overflow: hidden; border-radius: 32px; color: #fff; background: var(--ink); padding: 64px;
}
.contact-band::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 60% 90% at 85% 10%, #000 10%, transparent 70%);
    mask-image: radial-gradient(ellipse 60% 90% at 85% 10%, #000 10%, transparent 70%);
}
.contact-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: start; }
.contact-band h2 { font-family: var(--display); font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.7rem); line-height: 1.3; margin-bottom: 14px; }
.contact-band p { color: rgba(255, 255, 255, .78); font-size: 1.08rem; line-height: 1.9; max-width: 32em; margin-bottom: 28px; }
.mail-big { display: inline-block; direction: ltr; font-size: clamp(1.3rem, 1rem + 1.3vw, 2rem); font-weight: 700; color: #fff; margin-bottom: 26px; border-bottom: 2px solid var(--saffron); padding-bottom: 2px; }
.mail-big:hover { color: var(--saffron); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.info-list { display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.info-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.info-list span { color: rgba(255, 255, 255, .6); font-size: .9rem; }
.info-list b { font-weight: 600; text-align: end; }

/* ---------------- الفوتر ---------------- */
footer, .site-footer { padding: 64px 0 36px; background: var(--paper); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-grid p { color: var(--ink-2); margin-top: 14px; max-width: 30em; line-height: 1.85; }
.footer-grid h3, .footer-grid h5 { font-family: var(--body); font-weight: 600; font-size: .95rem; margin-bottom: 12px; }
.footer-grid ul { display: grid; gap: 9px; }
.footer-grid a { color: var(--ink-2); }
.footer-grid a:hover { color: var(--cobalt); }
.copyright { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; padding-top: 24px; font-size: .86rem; color: var(--ink-3); }
.copyright a:hover { color: var(--ink); }

/* ---------------- صفحات السياسات (privacy / terms / data-deletion) ---------------- */
.legal-page { padding: 64px 0 24px; }
.legal-page .container, .legal-page .wrap { max-width: 820px; }
.legal-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 56px 64px; }
.legal-page h1 { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.3; margin-bottom: 6px; }
.legal-page .updated { display: block; color: var(--ink-3); font-size: .9rem; margin-bottom: 36px; }
.legal-page h2 { font-size: 1.18rem; font-weight: 600; margin: 38px 0 10px; }
.legal-page p, .legal-page li { color: #33425D; }
.legal-page p { margin-bottom: 14px; }
.legal-page ul, .legal-page ol { padding-inline-start: 22px; margin-bottom: 14px; display: grid; gap: 6px; list-style: disc; }
.legal-page ol { list-style: decimal; }
.legal-page a { color: var(--cobalt); border-bottom: 1px solid rgba(36, 67, 201, .3); }
.legal-page .box { background: var(--page); border-radius: 12px; padding: 22px 24px; margin-top: 18px; }
.legal-page .box p:last-child { margin-bottom: 0; }
.back { display: inline-block; margin-bottom: 22px; font-size: .92rem; color: var(--ink-2); }
.back:hover { color: var(--ink); }

/* ---------------- الصفحة الإنجليزية: أسطر العناوين اللاتينية أقصر ---------------- */
html[lang="en"] body { line-height: 1.7; }
html[lang="en"] .hero h1 { font-size: clamp(2.4rem, 1.2rem + 3.4vw, 4rem); line-height: 1.12; letter-spacing: -.5px; }
html[lang="en"] .block-head h2, html[lang="en"] .contact-band h2, html[lang="en"] .platform h2, html[lang="en"] .section-title { line-height: 1.18; }
html[lang="en"] .product-name h3 { line-height: 1.1; }
html[lang="en"] .hero .lead, html[lang="en"] .block-head p, html[lang="en"] .product-desc { line-height: 1.75; }

/* =========================================================
   محفوظة من النسخ السابقة (لم تعد مستخدمة في الصفحة الرئيسية)
   تبقى أسماؤها هنا حتى لا يظهر أي عنصر قديم بشكل مكسور — لا تحذفها
   ========================================================= */
.background-animation, .grid-overlay, .legal-strip, .preview, .stats, .eyebrow { display: none; }
.reveal, .reveal.active { opacity: 1; transform: none; }
.badge-soon, .platform-cards, .p-card, .project-tag { display: none; }
.service, .num, .contact-card, .footer-content, .contact-email-btn, .direct-email { all: unset; }
.project-header { display: contents; }
.grid-cards { display: grid; }
.tech-stack, .tech-badge { display: inline; }
.contact { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: start; }
.platform-band { background: var(--cobalt-soft); }
.platform { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.platform h2 { font-family: var(--display); font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.35; margin-bottom: 18px; }
.platform-copy > p { color: var(--ink-2); margin-bottom: 26px; max-width: 34rem; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 500; color: var(--cobalt-2); margin-bottom: 18px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--saffron); }
.check-list { display: grid; gap: 12px; margin-bottom: 32px; }
.check-list li { position: relative; padding-inline-start: 26px; }
.check-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .66em; width: 10px; height: 10px; border-radius: 2px; background: var(--green); }
.note { font-size: .86rem; color: var(--ink-2); margin-top: 20px; max-width: 32rem; }
.app { background: var(--paper); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px rgba(14, 26, 51, .16); }
.app-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.numbers { display: flex; gap: 6px; }
.numbers span { font-size: .75rem; padding: 3px 9px; border-radius: 6px; background: #F1F3F8; color: var(--ink-2); }
.numbers span.on { background: var(--cobalt); color: #fff; }
.app-body { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 340px; }
.threads { border-inline-end: 1px solid var(--line); }
.thread { padding: 12px 14px; font-size: .8rem; border-bottom: 1px solid #F0F2F6; }
.thread b { display: flex; justify-content: space-between; font-size: .84rem; }
.thread b em { font-style: normal; font-weight: 400; color: var(--ink-3); font-size: .72rem; }
.thread span { display: block; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.active { background: #F5F7FC; }
.convo { display: flex; flex-direction: column; background: #F7F8FA; }
.convo-head { display: flex; justify-content: space-between; padding: 11px 16px; background: var(--paper); border-bottom: 1px solid var(--line); font-size: .82rem; }
.convo-head span { color: var(--ink-3); }
.msgs { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 16px; }
.msg { max-width: 80%; padding: 8px 12px 6px; border-radius: 10px; font-size: .83rem; line-height: 1.6; }
.msg small { display: block; font-size: .68rem; color: var(--ink-3); margin-top: 2px; }
.msg.in { align-self: flex-start; background: var(--paper); }
.msg.out { align-self: flex-end; background: #DDF3E8; }
.compose { margin: 0 14px 14px; padding: 10px 12px; border-radius: 9px; background: var(--paper); border: 1px solid var(--line); font-size: .8rem; color: var(--ink-3); }
.work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.glass-panel, .project-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 40px; }
.project-top { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.project-logo { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: #fff; }
.project-logo.brinq { background: var(--ink); }
.project-logo.hala { background: var(--green); }
.project-title { font-family: var(--display); font-size: 1.55rem; line-height: 1.3; }
.project-title small { display: block; font-family: var(--body); font-size: .85rem; font-weight: 400; color: var(--ink-3); }
.project-desc { color: var(--ink-2); margin-bottom: 22px; }
.project-features { display: grid; gap: 8px; margin-bottom: 26px; }
.project-features li { position: relative; padding-inline-start: 20px; }
.project-features li::before { content: ""; position: absolute; inset-inline-start: 0; top: .78em; width: 7px; height: 7px; border-radius: 1px; background: var(--cobalt); }
.project-link { display: inline-block; direction: ltr; font-weight: 500; color: var(--cobalt); border-bottom: 1px solid currentColor; }
.project-link:hover { color: var(--cobalt-2); }

/* =========================================================
   الشاشات المتوسطة والصغيرة
   ========================================================= */
@media (max-width: 1080px) {
    .hero-grid { gap: 40px; }
    .product-copy { padding: 44px 40px 40px; }
    .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
    .step:nth-child(2)::after { display: none; }
}

@media (max-width: 900px) {
    .menu-btn { display: inline-grid; place-items: center; }
    .nav-links {
        position: absolute; top: 100%; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 2px;
        padding: 10px 16px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(14, 26, 51, .12);
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 14px; font-size: 1.05rem; }
    .hero { padding: 40px 0 72px; }
    .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
    .kufic { max-width: 440px; width: 100%; margin-inline: auto; }
    .facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .facts dl > div { border-inline-start: 0; padding-inline: 0; }
    .facts dl > div:nth-child(even) { border-inline-start: 1px solid var(--line); padding-inline-start: 20px; }
    .facts dl > div:nth-child(n+3) { border-top: 1px solid var(--line); }
    .block { padding: 84px 0; }
    .platform, .contact, .work { grid-template-columns: minmax(0, 1fr); }   /* أنماط قديمة محفوظة */
    .product { grid-template-columns: minmax(0, 1fr); }
    .product.flip .product-copy { order: 0; }
    .product-visual { min-height: 0; padding: 40px 24px; }
    .integrations { grid-template-columns: minmax(0, 1fr); }
    .contact-band { padding: 48px 32px; }
    .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; }
    .nav { gap: 12px; height: 68px; }
    .brand-text small { display: none; }
    .nav-cta .btn-sm { display: none; }
    .hero-actions .btn { flex: 1 1 100%; }
    .block { padding: 68px 0; }
    .block-head { margin-bottom: 36px; }
    .product { border-radius: 24px; }
    .app-body { grid-template-columns: minmax(0, 1fr); }   /* أنماط قديمة محفوظة */
    .threads { display: none; }
    .glass-panel, .project-card { padding: 28px 22px; }
    .product-copy { padding: 30px 22px 28px; }
    .product-actions .btn { flex: 1 1 100%; }
    .v-chip { font-size: .78rem; padding: 8px 11px; }
    .v-stage .chip-a { inset-inline-end: -8px; }
    .v-stage .chip-b { inset-inline-start: -8px; }
    .v-inbox .chip-a { inset-inline-end: 12px; }
    .v-inbox .chip-b { inset-inline: 0; }
    .ib-tabs span:nth-child(3) { display: none; }
    .services { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .steps { grid-template-columns: minmax(0, 1fr); }
    .step::after { display: none; }
    .contact-sec { padding-bottom: 68px; }
    .contact-band { padding: 36px 22px; border-radius: 24px; }
    .contact-actions .btn { flex: 1 1 100%; }
    .info-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
    .info-list b { text-align: start; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .legal-card { padding: 32px 20px; border-radius: 14px; }
    .facts dl { grid-template-columns: minmax(0, 1fr); }
    .facts dl > div, .facts dl > div:nth-child(even) { border-inline-start: 0; padding-inline-start: 0; padding-block: 16px; }
    .facts dl > div + div { border-top: 1px solid var(--line); }
}

@media (max-width: 360px) {
    .lang { padding: 0 10px; }
    .brand-text b { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .kufic-grid.animate i.on, .kufic-grid.animate i.dot { animation: none; }
    * { transition-duration: .001ms !important; }
}
