/* ============================================================================
   AI-ENG REST - site.css : هوية موقع نظام AI-ENG لإدارة المطاعم والكاشير
   EN: Site styles - the AI-ENG family (black, gold, Reem Kufi / Cairo) with a warm "kitchen ember" accent
   ----------------------------------------------------------------------------
   - المظهران: data-theme="dark" (الافتراضي) و"light" ، والألوان كلها متغيرات هنا فقط.
   - الذهبي = الهوية والأزرار ، الجمري = المطعم (العروض والشارات) ، الأخضر = متاح/تم ، الأحمر = نفد/غير متاح.
   ============================================================================ */
:root {
  --radius: 18px;
  --radius-sm: 11px;
  --wrap: 1220px;
  --f-display: "Reem Kufi", "Cairo", Tahoma, sans-serif;
  --f-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --f-latin: "Marcellus", "Cairo", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
:root,
:root[data-theme="dark"] {
  --bg: #0B0B0C;
  --bg-2: #111113;
  --surface: #17171A;
  --surface-2: #1E1E22;
  --line: #2C2820;
  --line-strong: #4A3F22;
  --text: #ECE7DA;
  --text-soft: #C9C3B4;
  --mute: #9D978A;
  --gold: #C9A227;
  --gold-text: #E6C75A;
  --gold-soft: rgba(201, 162, 39, .12);
  --on-gold: #0B0B0C;
  --ember: #F07A3A;
  --ember-soft: rgba(240, 122, 58, .14);
  --green: #2BB673;
  --green-soft: rgba(43, 182, 115, .14);
  --red: #E0574B;
  --red-soft: rgba(224, 87, 75, .15);
  --plate: #FBF8F1;
  --paper: #FFFFFF;
  --paper-ink: #151515;
  --shadow: 0 22px 50px rgba(0, 0, 0, .5);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, .35);
  --glow: radial-gradient(60% 55% at 70% 20%, rgba(240, 122, 58, .16), transparent 70%), radial-gradient(50% 50% at 15% 80%, rgba(201, 162, 39, .12), transparent 70%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #FBFAF7;
  --bg-2: #F4F1EA;
  --surface: #FFFFFF;
  --surface-2: #F7F4EC;
  --line: #E6E1D5;
  --line-strong: #D6CBAE;
  --text: #1A1814;
  --text-soft: #3E3A32;
  --mute: #6F6A5F;
  --gold: #C9A227;
  --gold-text: #8A6B0F;
  --gold-soft: rgba(201, 162, 39, .12);
  --on-gold: #0B0B0C;
  --ember: #C2531B;
  --ember-soft: rgba(194, 83, 27, .10);
  --green: #13804A;
  --green-soft: rgba(19, 128, 74, .10);
  --red: #B83A2F;
  --red-soft: rgba(184, 58, 47, .10);
  --plate: #FFFFFF;
  --paper: #FFFFFF;
  --paper-ink: #151515;
  --shadow: 0 20px 44px rgba(40, 30, 10, .12);
  --shadow-sm: 0 8px 20px rgba(40, 30, 10, .08);
  --glow: radial-gradient(60% 55% at 70% 20%, rgba(240, 122, 58, .10), transparent 70%), radial-gradient(50% 50% at 15% 80%, rgba(201, 162, 39, .10), transparent 70%);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--f-body); font-size: 16.5px; line-height: 1.85;
  overflow-x: hidden;
}
html[lang="en"] body { line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.latin { font-family: var(--f-latin); letter-spacing: .02em; }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 22px; min-height: 48px;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 700; cursor: pointer; transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.btn-gold { background: linear-gradient(135deg, #E9C95B, #C9A227 55%, #A8841A); color: var(--on-gold); border-color: transparent; box-shadow: 0 10px 26px rgba(201, 162, 39, .28); }
.btn-gold:hover { box-shadow: 0 14px 30px rgba(201, 162, 39, .38); }
.btn-wa { background: #1FAF5A; color: #fff; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .92em; }
.btn i { font-size: 1.15em; }

/* ---------- الرأس ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.site-head.scrolled { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 18px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.brand img { height: 34px; width: auto; }
.brand .tag { font-family: var(--f-display); font-size: .95em; color: var(--gold-text); border-inline-start: 1px solid var(--line-strong); padding-inline-start: 12px; line-height: 1.2; }
.logo-light { display: none; }
:root[data-theme="light"] .logo-dark { display: none; }
:root[data-theme="light"] .logo-light { display: block; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text-soft); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: .95em; text-decoration: none; white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--gold-text); background: var(--gold-soft); }
.head-tools { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; display: inline-grid; place-items: center; font-weight: 800; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.menu-btn { display: none; }

/* ---------- البطل ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--glow); pointer-events: none; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1.4px); background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.02fr 1.18fr; gap: 46px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ember-soft); color: var(--ember); font-weight: 700; font-size: .9em; }
.hero h1 { font-family: var(--f-display); font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.22; margin: 16px 0 8px; font-weight: 700; }
.hero h1 .gold { background: linear-gradient(120deg, #F4DC86, #C9A227 50%, #E9C95B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .slogan { font-family: var(--f-display); font-size: clamp(1.15rem, 2vw, 1.45rem); color: var(--gold-text); margin: 0 0 14px; }
.hero p.lead { color: var(--text-soft); font-size: 1.08em; max-width: 36em; margin: 0 0 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); font-size: .88em; font-weight: 600; }
.chip i { color: var(--green); }

.device { position: relative; }
.screen {
  position: relative; border-radius: 18px; padding: 10px; background: linear-gradient(160deg, #2a2a2f, #121214); border: 1px solid #3a3a40;
  box-shadow: var(--shadow), 0 0 0 1px rgba(201, 162, 39, .08); transform: perspective(1600px) rotateY(-7deg) rotateX(2deg);
  transition: transform .8s var(--ease);
}
html[dir="ltr"] .screen { transform: perspective(1600px) rotateY(7deg) rotateX(2deg); }
.device:hover .screen { transform: perspective(1600px) rotateY(0) rotateX(0); }
.screen img { border-radius: 10px; width: 100%; aspect-ratio: 1366 / 768; object-fit: cover; }
.float-card {
  position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm); font-size: .88em; font-weight: 700; animation: bob 6s ease-in-out infinite;
}
.float-card i { font-size: 1.35em; }
.float-card small { display: block; color: var(--mute); font-weight: 600; font-size: .86em; }
.fc-1 { top: -18px; inset-inline-start: -10px; } .fc-1 i { color: var(--green); }
.fc-2 { bottom: 22%; inset-inline-end: -22px; animation-delay: -2s; } .fc-2 i { color: var(--ember); }
.fc-3 { bottom: -20px; inset-inline-start: 12%; animation-delay: -4s; } .fc-3 i { color: var(--gold-text); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- شريط الأرقام ---------- */
.stats { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 22px 14px; text-align: center; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat b { display: block; font-family: var(--f-display); font-size: 2.1rem; color: var(--gold-text); line-height: 1.2; }
.stat span { color: var(--mute); font-size: .92em; font-weight: 600; }

/* ---------- الأقسام ---------- */
.section { padding: 90px 0; position: relative; }
.section.alt { background: var(--bg-2); }
.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.kicker { color: var(--ember); font-weight: 800; letter-spacing: .04em; font-size: .92em; }
.section-head h2 { font-family: var(--f-display); font-size: clamp(1.75rem, 3.2vw, 2.55rem); line-height: 1.3; margin: 8px 0 12px; font-weight: 700; }
.section-head p { color: var(--text-soft); margin: 0; font-size: 1.04em; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
html.no-js .reveal { opacity: 1; transform: none; }

/* ---------- العرض الحي لشاشة البيع ---------- */
.demo { display: grid; grid-template-columns: 1fr 380px; gap: 0; border-radius: 22px; overflow: hidden; border: 1px solid #34302a; background: #121214; color: #ECE7DA; box-shadow: var(--shadow); }
.demo-main { padding: 16px; min-width: 0; }
.demo-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.demo-bar .who { margin-inline-start: auto; color: #9D978A; font-size: .82em; line-height: 1.4; text-align: end; }
.demo-bar .who b { color: #ECE7DA; display: block; font-size: 1.05em; }
.tbtn { border: 1px solid #5a4b22; background: transparent; color: #E6C75A; border-radius: 12px; padding: 7px 14px; font-weight: 700; cursor: pointer; min-height: 40px; }
.tbtn:hover { background: rgba(201, 162, 39, .1); }
.tbtn.on { background: linear-gradient(135deg, #E9C95B, #C9A227); color: #0B0B0C; border-color: transparent; }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cats .tbtn { flex: 0 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; min-height: 300px; align-content: start; }
.tile { position: relative; border: 1px solid #3b3832; border-radius: 12px; background: #1B1B1F; overflow: hidden; cursor: pointer; text-align: center; padding: 0 0 6px; transition: transform .15s, border-color .15s; color: #ECE7DA; }
.tile:hover { transform: translateY(-3px); border-color: #C9A227; }
.tile .bar { height: 5px; }
.tile img { width: 100%; aspect-ratio: 480 / 330; object-fit: cover; }
.tile .n { font-weight: 700; font-size: .9em; line-height: 1.35; padding: 4px 6px 0; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.tile .p { color: #D9B44A; font-size: .86em; direction: ltr; }
.tile.out { opacity: .45; }
.tile .badge { position: absolute; top: 10px; inset-inline-end: 6px; background: #E0574B; color: #fff; font-size: .72em; font-weight: 800; padding: 1px 8px; border-radius: 10px; }
.tile .offer { position: absolute; top: 10px; inset-inline-start: 6px; background: #F07A3A; color: #fff; font-size: .72em; font-weight: 800; padding: 1px 8px; border-radius: 10px; }
.demo-side { background: #18181B; border-inline-start: 1px solid #2C2820; display: flex; flex-direction: column; padding: 14px; gap: 10px; min-width: 0; }
.order-title { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.order-title small { color: #9D978A; font-weight: 600; }
.lines { flex: 1; min-height: 210px; max-height: 330px; overflow-y: auto; border: 1px solid #2C2820; border-radius: 12px; padding: 6px; background: #141416; }
.lines .empty { color: #9D978A; text-align: center; padding: 60px 10px; font-size: .92em; }
.ln { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; padding: 6px; border-radius: 9px; }
.ln + .ln { border-top: 1px dashed #2C2820; }
.ln .nm { font-weight: 700; font-size: .9em; line-height: 1.35; }
.ln .sub { color: #9D978A; font-size: .78em; font-weight: 600; display: block; }
.ln .disc { color: #F07A3A; font-size: .78em; font-weight: 700; display: block; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid #3b3832; background: #1E1E22; color: #ECE7DA; cursor: pointer; font-weight: 800; line-height: 1; }
.qty b { min-width: 18px; text-align: center; font-size: .9em; }
.ln .amt { direction: ltr; font-weight: 800; font-size: .9em; min-width: 54px; text-align: end; }
.coupon { display: flex; gap: 6px; }
.coupon input { flex: 1; min-width: 0; border: 1px solid #3b3832; background: #141416; color: #ECE7DA; border-radius: 10px; padding: 8px 10px; font: inherit; direction: ltr; text-transform: uppercase; }
.totals { font-size: .9em; color: #C9C3B4; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.5em; font-weight: 800; color: #E6C75A; margin-top: 2px; }
.totals .grand span:last-child, .totals span.v { direction: ltr; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay { grid-column: 1 / -1; min-height: 54px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #1FA463, #0F7A45); color: #fff; font-weight: 800; font-size: 1.15em; cursor: pointer; }
.pay:disabled { opacity: .5; cursor: not-allowed; }
.demo-note { text-align: center; color: var(--mute); font-size: .88em; margin-top: 14px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(30px); opacity: 0; z-index: 90; background: #1E1E22; color: #ECE7DA; border: 1px solid #4A3F22; padding: 10px 18px; border-radius: 14px; box-shadow: var(--shadow); transition: .3s var(--ease); max-width: calc(100vw - 32px); font-weight: 600; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* النوافذ */
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .62); }
.modal.open { display: flex; }
.modal-box { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: #18181B; color: #ECE7DA; border: 1px solid #4A3F22; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.modal-box h3 { margin: 0 0 10px; font-family: var(--f-display); color: #E6C75A; font-size: 1.3em; }
.opt-group { margin: 10px 0; }
.opt-group > b { display: block; margin-bottom: 6px; color: #C9C3B4; font-size: .92em; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #3b3832; border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: .92em; }
.opts input { accent-color: #C9A227; }
.opts label:has(input:checked) { border-color: #C9A227; background: rgba(201, 162, 39, .1); }
.opts .d { color: #D9B44A; direction: ltr; font-size: .9em; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }
.receipt { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 16px 16px 10px; font-size: .86em; line-height: 1.55; font-family: "Cairo", Tahoma, sans-serif; }
.receipt h4 { text-align: center; margin: 0; font-size: 1.15em; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #999; margin: 8px 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 8px; }
.receipt .row span:last-child { direction: ltr; white-space: nowrap; }
.receipt .big { font-weight: 800; font-size: 1.25em; }
.receipt .qr { display: grid; place-items: center; margin: 10px 0 4px; }
.receipt .qr svg, .receipt .qr img { width: 150px; height: 150px; }
.receipt .demo-mark { text-align: center; color: #9a6f00; font-weight: 700; font-size: .85em; }
.tickets { display: grid; gap: 10px; }
.ticket { background: var(--paper); color: var(--paper-ink); border-radius: 6px; padding: 10px 12px; font-size: .86em; }
.ticket b { display: block; border-bottom: 1px dashed #999; margin-bottom: 4px; }

/* ---------- المزايا ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.card .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45em; background: var(--gold-soft); color: var(--gold-text); margin-bottom: 12px; }
.card.ember .ico { background: var(--ember-soft); color: var(--ember); }
.card.green .ico { background: var(--green-soft); color: var(--green); }
.card h3 { margin: 0 0 6px; font-size: 1.08em; font-weight: 800; }
.card p { margin: 0; color: var(--text-soft); font-size: .93em; line-height: 1.75; }

/* ---------- الدورة ---------- */
.cycle { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; position: relative; counter-reset: st; }
.cycle::before { content: ""; position: absolute; top: 34px; inset-inline: 7%; height: 2px; background: linear-gradient(90deg, var(--gold), var(--ember), var(--green)); opacity: .55; }
.step { position: relative; text-align: center; padding: 0 8px; counter-increment: st; }
.step .dot { position: relative; z-index: 1; width: 68px; height: 68px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-strong); font-size: 1.6em; color: var(--gold-text); transition: .3s; }
.step:hover .dot { border-color: var(--ember); color: var(--ember); transform: scale(1.06); }
.step .dot::after { content: counter(st); position: absolute; top: -6px; inset-inline-end: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-size: .5em; font-weight: 800; display: grid; place-items: center; font-family: var(--f-body); }
.step h3 { font-size: .98em; margin: 0 0 4px; font-weight: 800; }
.step p { margin: 0; color: var(--mute); font-size: .85em; line-height: 1.6; }

/* ---------- أنواع الطلب ---------- */
.otypes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.otype { text-align: center; padding: 22px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.otype i { font-size: 2em; color: var(--ember); display: block; margin-bottom: 6px; }
.otype b { display: block; font-size: 1.02em; }
.otype span { color: var(--mute); font-size: .84em; line-height: 1.6; display: block; }

/* ---------- المعرض ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 22px; }
.tab { border: 1px solid var(--line); background: var(--surface); color: var(--text-soft); border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.tab.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { margin: 0; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); cursor: zoom-in; transition: transform .25s var(--ease), box-shadow .25s; }
.shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #111; }
.shot figcaption { padding: 10px 14px 12px; font-weight: 700; font-size: .92em; }
.shot figcaption span { display: block; color: var(--mute); font-weight: 600; font-size: .9em; }
.shot[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 85; background: rgba(0, 0, 0, .86); display: none; align-items: center; justify-content: center; padding: 18px; flex-direction: column; gap: 10px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100vh - 110px); width: auto; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox p { color: #ECE7DA; margin: 0; font-weight: 700; text-align: center; }
.lb-close, .lb-nav { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 1px solid #4A3F22; background: #18181B; color: #E6C75A; cursor: pointer; font-size: 1.3em; display: grid; place-items: center; }
.lb-close { top: 16px; inset-inline-end: 16px; }
.lb-prev { inset-inline-start: 16px; top: 50%; }
.lb-next { inset-inline-end: 16px; top: 50%; }
html[dir="ltr"] .lb-nav i { display: inline-block; transform: scaleX(-1); }

/* ---------- الفوترة الإلكترونية ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-soft); }
.ticks li i { color: var(--green); font-size: 1.15em; margin-top: 3px; }
.ticks li b { color: var(--text); }
.receipts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.receipts figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #111; cursor: zoom-in; }
.receipts figure:nth-child(2) { margin-top: 40px; }
.receipts figcaption { padding: 8px 12px; font-size: .86em; font-weight: 700; background: var(--surface); }
.flag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: .9em; margin: 4px; }

/* ---------- الأدوار ---------- */
.roles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.role { padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.role i { color: var(--gold-text); font-size: 1.4em; }
.role b { display: block; margin: 4px 0 2px; }
.role span { color: var(--mute); font-size: .86em; line-height: 1.6; display: block; }

/* ---------- لماذا / خارطة ---------- */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.road { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.road .card .state { display: inline-flex; gap: 6px; align-items: center; font-size: .8em; font-weight: 800; padding: 2px 10px; border-radius: 10px; margin-bottom: 8px; }
.state.done { background: var(--green-soft); color: var(--green); }
.state.wip { background: var(--gold-soft); color: var(--gold-text); }

/* ---------- الطلب والتواصل ---------- */
.quote { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; align-items: start; }
.quote-card { background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-sm); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92em; color: var(--text-soft); }
.form input, .form select, .form textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 13px; min-height: 48px; width: 100%; }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.contact-list { display: grid; gap: 12px; margin-top: 20px; }
.contact-list a, .contact-list div { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; text-decoration: none; }
.contact-list i { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold-text); font-size: 1.15em; }

/* ---------- الأسئلة ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font-weight: 800; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-text); font-size: 1.4em; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--text-soft); }

/* ---------- التذييل ---------- */
.cta-band { padding: 70px 0; text-align: center; background: var(--glow), var(--bg-2); border-top: 1px solid var(--line); }
.cta-band h2 { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 10px; }
.cta-band p { color: var(--text-soft); margin: 0 auto 22px; max-width: 640px; }
.site-foot { padding: 40px 0 24px; border-top: 1px solid var(--line); color: var(--mute); font-size: .92em; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 26px; }
.foot-grid h4 { color: var(--text); margin: 0 0 10px; }
.foot-grid a { color: var(--text-soft); display: block; margin: 4px 0; }
.foot-bottom { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.wa-float { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #1FAF5A; color: #fff; display: grid; place-items: center; font-size: 1.8em; box-shadow: 0 12px 26px rgba(31, 175, 90, .4); text-decoration: none !important; }

/* ---------- فيلم الشرح: المراحل والفصول (js/film.js) ----------
   المشغّل داكن في المظهرين (إطار سينمائي) ، والذهبي وحده لون التقدم والفصل الحالي ، والجمري لاسم المرحلة كالعناوين الصغيرة. */
.film { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.film:not(.film-js) { grid-template-columns: 1fr; }
.film:not(.film-js) .film-rail, .film:not(.film-js) .film-stages, .film:not(.film-js) .film-now { display: none; }
.film-main { min-width: 0; }
.film-stages { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fs-step {
  flex: 1 1 0; min-width: min-content;
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 11px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-soft);
  font-weight: 700; font-size: .86em; line-height: 1.3; text-align: start; cursor: pointer; transition: border-color .2s, background .2s, color .2s;
}
.fs-step:hover { border-color: var(--line-strong); color: var(--text); }
.fs-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .82em; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--gold-text); }
.fs-fill { position: absolute; inset-block-end: 0; inset-inline-start: 0; height: 3px; width: 0; background: var(--gold); }
.fs-step.on { border-color: var(--gold); background: var(--gold-soft); color: var(--text); }
.fs-step.on .fs-n { background: var(--gold); border-color: transparent; color: var(--on-gold); }
.fs-step.done .fs-n { background: var(--gold-soft); }

.film-player { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line-strong); box-shadow: var(--shadow); color: #ECE7DA; }
.film-player:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.film-screen { position: relative; aspect-ratio: 16 / 9; background: #000; }
.film-screen video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.film-js .film-screen video { cursor: pointer; }
.film-big {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; align-items: center; gap: 14px;
  padding-block: 10px; padding-inline: 10px 24px; border-radius: 999px; cursor: pointer; text-align: start;
  background: rgba(11, 11, 12, .8); border: 1px solid rgba(201, 162, 39, .6); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .5); transition: transform .2s var(--ease);
}
.film-big:hover { transform: scale(1.04); }
.film-screen:has(.film-inter.show) .film-big { opacity: 0; }
.film-big[hidden], .film-ctrl[hidden] { display: none; }
.fb-icon { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; font-size: 2.1em; background: #C9A227; color: #0B0B0C; animation: filmPulse 2.2s infinite; }
.fb-text b { display: block; font-family: var(--f-display); font-size: 1.3em; font-weight: 700; line-height: 1.3; }
.fb-text small { color: #D9D3C4; font-size: .86em; }
@keyframes filmPulse { 0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(201, 162, 39, 0); } }

/* بطاقة عنوان الفصل عند القفز إليه */
.film-inter { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; background: rgba(0, 0, 0, .6); transition: opacity .35s; }
.film-inter.show { opacity: 1; }
.fi-box { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 40px; text-align: center; transform: translateY(12px) scale(.96); transition: transform .5s var(--ease); }
.film-inter.show .fi-box { transform: none; }
.fi-stage { color: #F07A3A; font-weight: 800; font-size: clamp(.8rem, 1.4vw, 1rem); letter-spacing: .03em; }
.fi-n { font-family: var(--f-latin); font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1.05; color: #E6C75A; }
.fi-t { font-family: var(--f-display); font-size: clamp(1.25rem, 3.2vw, 2.4rem); font-weight: 700; color: #fff; line-height: 1.35; }
.fi-line { width: 0; height: 3px; margin-top: 8px; border-radius: 2px; background: #C9A227; transition: width .6s .15s var(--ease); }
.film-inter.show .fi-line { width: 120px; }
.film-wait { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #C9A227; opacity: 0; pointer-events: none; }
.film-wait.on { opacity: 1; animation: filmSpin .8s linear infinite; }
@keyframes filmSpin { to { transform: rotate(360deg); } }

/* شريط الأدوات وشريط الفصول */
.film-ctrl { display: flex; align-items: center; gap: 4px; padding: 7px 10px; background: #0E0E10; border-top: 1px solid #2C2820; }
.fc-btn { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: 1.15em; cursor: pointer; transition: background .15s, color .15s; }
.fc-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .08); color: #E6C75A; }
.fc-btn:disabled { opacity: .35; cursor: default; }
.fc-rate { width: auto; min-width: 38px; padding: 0 8px; font-size: .88em; font-weight: 700; }
.fc-time { flex: none; min-width: 88px; text-align: center; font-size: .84em; color: #C9C3B4; }
.fc-seek { position: relative; flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; gap: 3px; cursor: pointer; touch-action: none; margin: 0 6px; }
.fc-seek:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.fs-seg { position: relative; flex-basis: 0; min-width: 3px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); transition: height .15s; }
.fs-seg.edge { background: rgba(255, 255, 255, .09); }
.fs-seg > i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; border-radius: inherit; background: #C9A227; }
.fc-seek:hover .fs-seg, .fs-seg.on { height: 9px; }
.fs-seg em {
  position: absolute; bottom: 18px; inset-inline-start: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  padding: 3px 10px; border-radius: 8px; background: #000; border: 1px solid rgba(201, 162, 39, .6); color: #fff;
  font-style: normal; font-size: .78rem; font-weight: 700; opacity: 0; transition: opacity .15s;
}
html[dir="rtl"] .fs-seg em { transform: translateX(50%); }
.fs-seg:first-child em, html[dir="rtl"] .fs-seg:first-child em { inset-inline-start: 0; transform: none; }
.fs-seg:last-child em, html[dir="rtl"] .fs-seg:last-child em { inset-inline-start: auto; inset-inline-end: 0; transform: none; }
.fs-seg:hover em { opacity: 1; }

/* الفصل الحالي تحت المشغّل */
.film-now {
  display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold);
}
.fn-num { flex: none; width: 74px; height: 74px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; background: var(--gold-soft); border: 1px solid var(--line-strong); }
.fn-num b { font-family: var(--f-latin); font-size: 2em; font-weight: 400; color: var(--gold-text); }
.fn-num small { margin-top: 5px; font-size: .74em; color: var(--mute); }
.fn-num i { font-size: 1.8em; color: var(--gold-text); }
.fn-body { flex: 1; min-width: 0; }
.fn-k { color: var(--ember); font-weight: 800; font-size: .85em; }
.fn-body h3 { margin: 2px 0 4px; font-family: var(--f-display); font-size: 1.35em; font-weight: 700; line-height: 1.35; }
.fn-body p { margin: 0; color: var(--text-soft); font-size: .97em; line-height: 1.75; }
.fn-nav { flex: none; display: flex; gap: 6px; }
.fn-nav .fc-btn { border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); }
.fn-nav .fc-btn:hover:not(:disabled) { border-color: var(--gold); background: var(--gold-soft); color: var(--gold-text); }
.film-now.swap .fn-num, .film-now.swap .fn-body { animation: filmIn .5s var(--ease); }
@keyframes filmIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* قائمة الفصول مجمّعة بالمراحل */
.film-rail { position: sticky; top: 88px; display: flex; flex-direction: column; max-height: min(760px, calc(100vh - 110px)); overflow: hidden; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.fr-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.fr-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2em; background: var(--gold-soft); color: var(--gold-text); }
.fr-head b { display: block; font-family: var(--f-display); font-size: 1.1em; line-height: 1.3; }
.fr-head small { color: var(--mute); font-size: .84em; }
.fr-list { flex: 1; position: relative; margin: 0; padding: 6px 10px 12px; list-style: none; overflow: auto; scrollbar-width: thin; }
.fr-group { margin-bottom: 4px; }
.fr-group > ol { list-style: none; margin: 0 0 0; margin-inline-start: 12px; padding: 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--line); }
.fr-group.on > ol { border-inline-start-color: var(--gold); }
.fr-group.edge > ol { border-inline-start-style: dashed; }
.fr-stage { display: flex; align-items: center; gap: 8px; padding: 8px 0 5px; color: var(--mute); font-weight: 800; font-size: .84em; }
.fr-stage i { color: var(--gold-text); }
.fr-group.on .fr-stage { color: var(--gold-text); }
.fr-sn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .9em; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--gold-text); }
.fr-group.on .fr-sn { background: var(--gold); border-color: transparent; color: var(--on-gold); }
.fr-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); text-align: start; cursor: pointer; transition: background .15s, border-color .15s; }
.fr-item:hover { background: var(--surface-2); }
.fr-item.on { background: var(--gold-soft); border-color: var(--gold); }
.fr-thumb { position: relative; flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.fr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fr-item.on .fr-thumb { border-color: var(--gold); }
.fr-time { position: absolute; inset-block-end: 3px; inset-inline-end: 3px; padding: 0 5px; border-radius: 4px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .68em; line-height: 1.55; }
.fr-body { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.fr-n { font-family: var(--f-latin); color: var(--gold-text); font-size: .95em; }
.fr-t { font-weight: 700; font-size: .93em; line-height: 1.45; }
.fr-item.done .fr-t { color: var(--text-soft); }
.fr-bar { flex-basis: 100%; height: 3px; margin-top: 5px; border-radius: 2px; overflow: hidden; background: var(--line); }
.fr-bar i { display: block; width: 0; height: 100%; background: var(--gold); }
.fr-item.done .fr-bar i { opacity: .55; }
.film-note { max-width: 860px; margin: 20px auto 0; text-align: center; color: var(--mute); font-size: .9em; }
.film-note i { color: var(--gold-text); }
.film-player:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; }
.film-player:fullscreen .film-screen { flex: 1; aspect-ratio: auto; }

/* ---------- الشاشات الصغيرة ---------- */
/* القائمة بثمانية روابط لا تتسع في سطر واحد تحت 1240 بكسل: تضيق ثم تصير قائمة منسدلة */
@media (max-width: 1240px) { .nav a { padding: 8px 10px; } }
@media (max-width: 1180px) {
  .nav { display: none; position: absolute; top: 72px; inset-inline: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-grid; }
  .head-tools { margin-inline-start: auto; }
}
@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .roles { grid-template-columns: repeat(3, 1fr); }
  .otypes { grid-template-columns: repeat(3, 1fr); }
  .demo { grid-template-columns: 1fr 330px; }
  .film { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 72px; inset-inline: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 16px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-grid; }
  .head-row .cta-head { display: none; }
  .hero-grid, .split, .quote { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .device { margin: 10px 8px 26px; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-inline-start: 0; }
  .cycle { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; }
  .cycle::before { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .demo { grid-template-columns: 1fr; }
  .film { grid-template-columns: 1fr; }
  .film-rail { position: static; max-height: 470px; }
  .fs-step { flex-basis: calc(33.333% - 6px); }
  .demo-side { border-inline-start: 0; border-top: 1px solid #2C2820; }
  .why, .road { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .wrap { padding: 0 16px; }
  .brand .tag { display: none; }
  .section { padding: 64px 0; }
  .features, .roles, .why, .road, .gallery, .form, .receipts { grid-template-columns: 1fr; }
  .otypes { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat { border-inline-start: 0; border-top: 1px solid var(--line); }
  .float-card { display: none; }
  .screen, html[dir="ltr"] .screen { transform: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .receipts figure:nth-child(2) { margin-top: 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .lb-nav { display: none; }
  .fc-rate, #fcPrev, #fcNext { display: none; }
  .fc-time { min-width: 0; font-size: .78em; }
  .film-now { flex-wrap: wrap; gap: 12px; padding: 14px; }
  .fn-num { width: 56px; height: 56px; }
  .fn-num b { font-size: 1.6em; }
  .fn-nav { margin-inline-start: auto; }
  .fn-body { flex-basis: calc(100% - 140px); }
  .fs-step { font-size: .8em; padding: 7px 8px; gap: 6px; }
  .fb-icon { width: 50px; height: 50px; font-size: 1.7em; }
  .fb-text b { font-size: 1.1em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
