/* ============================================================
   نُظم — main.css (index.html)
   Premium SaaS · RTL · Light · transform/opacity motion only
   ============================================================ */

:root {
  --bg: #F7F8F5;
  --surface: #FFFFFF;
  --surface-2: #F1F4EE;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #E6E9E2;
  --line-2: #D5DBCE;

  --brand: #1E6F50;
  --brand-2: #2E8B63;
  --brand-soft: #E6F2EC;
  --gold: #C99B3C;
  --gold-soft: #FBF3E2;

  --ok: #2E8B63; --warn: #D9912B; --bad: #D64545; --info: #2E6FA8; --off: #6B7A63;

  --r-sm: 14px; --r-md: 20px; --r-lg: 28px;
  --shadow: 0 10px 40px rgba(16, 24, 40, .08);
  --shadow-lg: 0 30px 80px rgba(16, 24, 40, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --container: 1200px;
  --gutter: 20px;

  --font-head: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.75;
  overflow-x: clip; -webkit-font-smoothing: antialiased;
}
html { overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; box-shadow: 0 0 0 2px #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 120px); position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13.5px; margin-bottom: 14px;
}
.eyebrow.gold { background: var(--gold-soft); color: #8a6a1e; }
.h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; color: var(--ink); }
.lead { color: var(--ink-2); font-size: clamp(1rem, 1.3vw, 1.15rem); margin-top: 14px; }
.muted { color: var(--muted); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 15.5px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 28px rgba(30, 111, 80, .28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(30, 111, 80, .34); }
.btn-ghost { color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.btn-light { color: var(--brand); background: #fff; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .18); }
.btn-dark { color: #fff; background: var(--ink); box-shadow: 0 12px 30px rgba(16, 24, 40, .28); }
.btn-dark:hover { background: #000; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(16, 24, 40, .34); }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.btn-lg .ic { width: 20px; height: 20px; }
.nav a.app-link { background: var(--ink); color: #fff; margin-inline: 4px; }
.nav a.app-link:hover { background: #000; color: #fff; }
.mobile-menu a.app-link { background: var(--ink); color: #fff; border-radius: 12px; padding-inline: 14px; margin-block: 8px; border-bottom: 0; }
/* زرار ملفت: توهّج نابض + لمعة بتعدّي + الزرار بيطفو والسهم بيتحرك */
.btn-glow { position: relative; overflow: hidden; animation: btnFloat 3.2s ease-in-out infinite; box-shadow: 0 14px 36px rgba(30, 111, 80, .35), 0 0 0 0 rgba(201, 155, 60, .5); }
.glow-ring { border-radius: 999px; box-shadow: 0 0 40px rgba(46, 139, 99, .35); }
.btn-glow::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60%; inset-inline-start: -80%; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .45) 50%, transparent 80%); transform: skewX(-18deg); animation: btnSheen 2.8s ease-in-out infinite; }
.btn-glow span[aria-hidden] { display: inline-block; animation: btnArrow 1.4s ease-in-out infinite; }
.btn-glow:hover { animation-play-state: paused; transform: translateY(-3px) scale(1.03); }
.glow-ring { position: relative; display: inline-block; }
.glow-ring::before, .glow-ring::after { content: ''; position: absolute; inset: 0; border-radius: 999px; border: 2px solid rgba(30, 111, 80, .55); animation: ringOut 2.4s ease-out infinite; pointer-events: none; }
.glow-ring::after { animation-delay: 1.2s; }
@keyframes btnFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@keyframes btnSheen { 0%, 55% { inset-inline-start: -80%; } 100% { inset-inline-start: 130%; } }
@keyframes btnArrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
@keyframes ringOut { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }
.mobile-section { overflow: clip; }
.btn-outline-light { color: #fff; border: 1.5px solid rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.btn .ic { width: 18px; height: 18px; }

/* ── Header ──────────────────────────────────────────── */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100; transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.header .container { display: flex; align-items: center; gap: 24px; height: 76px; }
.header.scrolled { background: rgba(247, 248, 245, .78); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 1px 0 var(--line), 0 8px 30px rgba(16, 24, 40, .06); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 900; font-size: 22px; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 11.5px; color: var(--muted); line-height: 1; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a { padding: 8px 13px; border-radius: 10px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a:hover, .nav a.active { background: var(--brand-soft); color: var(--brand); }
.header .btn { padding: 11px 20px; font-size: 14.5px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; place-items: center; margin-inline-start: auto; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; inset-inline: 0; top: 76px; z-index: 99; padding: 10px 20px 22px;
  background: rgba(247, 248, 245, .96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line); box-shadow: 0 20px 50px rgba(16, 24, 40, .12);
  transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform .3s var(--ease), opacity .25s, visibility 0s .3s;
}
.mobile-menu.open { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.mobile-menu a { display: block; padding: 13px 10px; border-bottom: 1px solid var(--line); font-weight: 600; }
.mobile-menu .btn { margin-top: 14px; width: 100%; }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding-top: clamp(120px, 14vw, 170px); padding-bottom: clamp(60px, 8vw, 110px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.hero-bg .b1 { width: 520px; height: 520px; background: #CDE8D9; top: -120px; inset-inline-end: -120px; }
.hero-bg .b2 { width: 420px; height: 420px; background: #F4E6C5; bottom: -80px; inset-inline-start: 10%; opacity: .5; }
.hero-bg .grid {
  position: absolute; inset: 0; opacity: .45;
  background-image: linear-gradient(rgba(16, 24, 40, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 24, 40, .045) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 60% 20%, #000 30%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 20%, #000 30%, transparent 72%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: clamp(32px, 5vw, 64px); }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); font-weight: 900; color: var(--ink); }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--brand), #3aa274 60%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); max-width: 560px; margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 18px 26px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.hero-proof span { display: inline-flex; align-items: center; gap: 7px; }
.hero-proof .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(46, 139, 99, .18); }

/* Composition */
.comp { position: relative; aspect-ratio: 1 / .86; min-height: 360px; perspective: 1600px; }
.comp > * { position: absolute; will-change: transform; }
[data-depth] { --px: 0px; --py: 0px; transform: translate3d(var(--px), var(--py), 0); }
.laptop { inset-inline-end: 0; top: 4%; width: 84%; transform: translate3d(var(--px), var(--py), 0) rotateY(-6deg) rotateX(3deg); transform-style: preserve-3d; }
.laptop .screen {
  border-radius: 18px 18px 6px 6px; background: #0f1511; padding: 10px 10px 14px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.laptop .screen img { border-radius: 10px; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; background: #e9ede5; }
.laptop .base { height: 14px; margin-inline: -3%; border-radius: 0 0 16px 16px; background: linear-gradient(#dfe3dc, #b8bfb4); box-shadow: 0 14px 30px rgba(16, 24, 40, .18); }
.laptop .base::after { content: ''; display: block; width: 18%; height: 4px; margin: 0 auto; border-radius: 0 0 6px 6px; background: #9aa295; }

.phone { width: 150px; border-radius: 30px; background: #0f1511; padding: 8px; box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.phone::before { content: ''; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 42%; height: 16px; border-radius: 999px; background: #0f1511; z-index: 2; }
.phone .scr { position: relative; border-radius: 23px; overflow: hidden; aspect-ratio: 390 / 844; background: #e9ede5; }
.phone .scr img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .scr::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255, 255, 255, .18), transparent 38%); pointer-events: none; }
.comp .phone { inset-inline-start: -2%; bottom: -4%; width: 31%; max-width: 190px; }

.fcard {
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 14px 40px rgba(16, 24, 40, .14);
  border-radius: 16px; padding: 11px 14px; display: flex; align-items: center; gap: 10px; min-width: 170px;
  animation: float 7s ease-in-out infinite;
}
.fcard .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; flex: none; }
.fcard .t { font-size: 12px; color: var(--muted); line-height: 1.3; }
.fcard .v { font-weight: 800; font-size: 15px; color: var(--ink); line-height: 1.3; }
.fcard .v.up { color: var(--ok); }
.f1 { top: -2%; inset-inline-start: 6%; animation-delay: -1s; }
.f2 { top: 36%; inset-inline-end: -5%; animation-delay: -3s; }
.f3 { bottom: 18%; inset-inline-end: 4%; animation-delay: -5s; }
.f4 { bottom: -6%; inset-inline-start: 34%; animation-delay: -2s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

/* ── Promise strip ───────────────────────────────────── */
.promise { padding-block: 28px; border-block: 1px solid var(--line); background: var(--surface); }
.promise .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.promise h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 800; }
.promise p { color: var(--muted); max-width: 560px; }

/* ── Features grid ───────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px 24px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #cfe1d6; }
.feature.wide { grid-column: span 2; background: linear-gradient(135deg, #fff, #F3F8F4); border-color: #d3e4d9; }
.feature.wide p { max-width: 60ch; }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ── Split sections (screenshot + text) ──────────────── */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split.rev > .shot-wrap { order: 2; }
.shot-wrap { position: relative; }
.shot { border-radius: var(--r-md); overflow: hidden; background: #e9ede5; box-shadow: var(--shadow-lg); border: 1px solid rgba(16, 24, 40, .08); }
.shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }   /* مساحة محجوزة قبل التحميل = صفر CLS */
.shot-wrap .glow { position: absolute; inset: 10% 0 -8% 6%; z-index: -1; border-radius: 40px; background: radial-gradient(closest-side, rgba(46, 139, 99, .22), transparent); filter: blur(12px); }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin-top: 22px; }
.checks li { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.checks li::before { content: ''; width: 20px; height: 20px; flex: none; border-radius: 6px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E6F50' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 30px; }
.counter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 14px; text-align: center; }
.counter b { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 900; color: var(--brand); line-height: 1.1; }
.counter span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── Attendance workflow ─────────────────────────────── */
.flow { display: flex; align-items: stretch; gap: 10px; margin-top: 28px; }
.flow .step { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px 12px; text-align: center; position: relative; }
.flow .step .n { width: 34px; height: 34px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--brand-soft); color: var(--brand); }
.flow .step b { display: block; font-size: 14px; }
.flow .arrow { align-self: center; color: var(--muted); flex: none; }
.flow .arrow svg { width: 22px; height: 22px; }
/* ── الحضور: خطوات بتنوّر بالترتيب + لوحة حضور حيّة ── */
.flow .step { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.flow .step .n { transition: background .35s ease, color .35s ease, box-shadow .35s ease; }
.flow-live .step.active { border-color: var(--brand); box-shadow: 0 12px 30px rgba(30,111,80,.16); transform: translateY(-4px); }
.flow-live .step.active .n { background: var(--brand); color: #fff; box-shadow: 0 0 0 6px rgba(46,139,99,.16); }
.flow-live .step.done .n { background: var(--brand-soft); color: var(--brand); }
.flow-live .arrow { transition: color .35s ease; }
.flow-live .arrow.lit { color: var(--brand); }
.att-board { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow); }
.att-head { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; font-weight: 800; color: var(--ink); padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.att-clock { font-family: var(--font-head); font-weight: 900; color: var(--brand); direction: ltr; font-variant-numeric: tabular-nums; }
.att-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.att-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.att-row .av { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 900; flex: none; }
.att-row b { font-weight: 800; }
.att-row em { font-style: normal; color: var(--muted); font-size: 12.5px; margin-inline-start: auto; }
.att-row .status { padding: 5px 11px; font-size: 12.5px; white-space: nowrap; transition: background .3s ease, color .3s ease; }
.att-row.flash { animation: attFlash .9s ease; }
.att-row.flash .status { animation: attPop .55s cubic-bezier(.2,.9,.3,1.4); }
@keyframes attFlash { 0% { background: rgba(46,139,99,.14) } 100% { background: transparent } }
@keyframes attPop { 0% { transform: scale(.6); opacity: .2 } 100% { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .att-row.flash, .att-row.flash .status, .carousel.play .car-bar i { animation: none; } }
.statuses { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); }
.status i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status.ok i { background: var(--ok); box-shadow: 0 0 0 3px rgba(46, 139, 99, .18); }
.status.warn i { background: var(--warn); box-shadow: 0 0 0 3px rgba(217, 145, 43, .18); }
.status.bad i { background: var(--bad); box-shadow: 0 0 0 3px rgba(214, 69, 69, .18); }
.status.off i { background: var(--off); box-shadow: 0 0 0 3px rgba(107, 122, 99, .18); }
.status.info i { background: var(--info); box-shadow: 0 0 0 3px rgba(46, 111, 168, .18); }

/* ── Orders live card ────────────────────────────────── */
.order-live {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; margin-top: 24px;
  box-shadow: var(--shadow); display: grid; gap: 12px;
}
.order-live .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-live .no { font-family: var(--font-head); font-weight: 900; font-size: 1.2rem; }
.order-live .meta { color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; transition: background .4s, color .4s; }
.badge[data-s="new"] { background: #E6EFF8; color: var(--info); }
.badge[data-s="processing"] { background: #FBF0DE; color: var(--warn); }
.badge[data-s="completed"] { background: var(--brand-soft); color: var(--ok); }
.track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.track span { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; position: relative; }
.track span::after { content: ''; position: absolute; inset: 0; background: var(--brand-2); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.track span.on::after { transform: scaleX(1); }
.track-labels { display: grid; grid-template-columns: repeat(3, 1fr); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.track-labels b { color: var(--ink); }

/* ── Mobile management (4 phones) ────────────────────── */
.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 40px; align-items: end; }
.phones .phone { position: relative; width: 100%; max-width: 230px; margin-inline: auto; transform: translateY(60px); opacity: 0; transition: transform .9s var(--ease), opacity .8s; transition-delay: calc(var(--i) * .14s); }
.phones.in .phone { transform: translateY(calc(var(--lift, 0) * 1px)); opacity: 1; }
.phones .cap { text-align: center; margin-top: 14px; font-weight: 700; color: var(--ink-2); font-size: 14px; }
.phones .cap small { display: block; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.mobile-section { background: radial-gradient(ellipse at 50% 0%, #EAF3EE, transparent 60%); }

/* ── Customer card ───────────────────────────────────── */
.crm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow); margin-top: 22px; }
.crm-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.crm-card .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--gold)); }
.crm-card .head b { display: block; }
.crm-card .head small { color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.crm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.crm-grid div { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--muted); }
.crm-grid div b { display: block; color: var(--ink); font-size: 14.5px; }

/* ── Loyalty ─────────────────────────────────────────── */
.loyalty { background: var(--ink); color: #fff; overflow: hidden; }
.loyalty .eyebrow { background: rgba(255, 255, 255, .12); color: #fff; }
.loyalty .h2 { color: #fff; }
.loyalty .lead { color: rgba(255, 255, 255, .72); }
.loop { display: flex; align-items: center; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.loop .node { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.loop .node .ic { width: 20px; height: 20px; color: var(--gold); }
.loop .arr { color: rgba(255, 255, 255, .35); }
.wallet-demo { position: relative; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-lg); padding: 26px; min-height: 280px; display: grid; place-items: center; }
.wallet { width: min(100%, 320px); background: linear-gradient(135deg, #1d3a2c, #142a20); border-radius: 22px; padding: 20px 22px; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .12); }
.wallet .who { display: flex; justify-content: space-between; color: rgba(255, 255, 255, .7); font-size: 13px; }
.wallet .bal { font-family: var(--font-head); font-weight: 900; font-size: 2.4rem; margin-top: 8px; color: var(--gold); }
.wallet .bal small { font-size: 1rem; color: rgba(255, 255, 255, .7); font-weight: 600; margin-inline-start: 4px; }
.wallet .hist { margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, .7); display: grid; gap: 6px; }
.pts-fly { position: absolute; top: 22%; inset-inline-start: 14%; background: var(--gold); color: #1a1408; font-weight: 900; padding: 8px 14px; border-radius: 999px; box-shadow: 0 10px 30px rgba(227, 182, 90, .4); opacity: 0; }
.pts-fly.go { animation: fly 3s var(--ease) infinite; }
@keyframes fly {
  0% { opacity: 0; transform: translate(0, 10px) scale(.9); }
  15% { opacity: 1; transform: translate(0, 0) scale(1); }
  60% { opacity: 1; transform: translate(-120px, 70px) scale(1); }
  75% { opacity: 0; transform: translate(-150px, 95px) scale(.6); }
  100% { opacity: 0; }
}
.wallet .bal.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); } }

/* ── Dashboard hotspots ──────────────────────────────── */
.hot-wrap { position: relative; overflow: visible !important; }
.hot-wrap > img { aspect-ratio: 16 / 10; border-radius: var(--r-md); }
.hot { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -50%); z-index: 3; }
.hot button { width: 100%; height: 100%; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(201, 155, 60, .25), 0 8px 20px rgba(0, 0, 0, .2); position: relative; }
.hot button::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(201, 155, 60, .6); animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
.hot .tip {
  position: absolute; bottom: calc(100% + 12px); inset-inline-start: 50%; transform: translateX(50%) translateY(6px); width: 220px;
  background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.55;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); box-shadow: var(--shadow-lg);
}
.hot .tip b { display: block; color: var(--gold); margin-bottom: 2px; }
.hot:hover .tip, .hot.open .tip, .hot:focus-within .tip { opacity: 1; transform: translateX(50%) translateY(0); pointer-events: auto; }
.hot-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; justify-content: center; }
.hot-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.hot-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }

/* ── Sticky storytelling ─────────────────────────────── */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: start; }
.story-visual { position: sticky; top: 110px; }
.story-stack { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 10; box-shadow: var(--shadow-lg); background: #e9ede5; border: 1px solid rgba(16, 24, 40, .08); }
.story-stack img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.03); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.story-stack img.on { opacity: 1; transform: none; }
.story-stack .tag { position: absolute; top: 14px; inset-inline-end: 14px; background: rgba(16, 24, 40, .8); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; backdrop-filter: blur(8px); }
.story-steps { display: grid; gap: 12px; padding-block: 10px; }
.story-step { padding: 26px 24px; border-radius: var(--r-md); border: 1px solid transparent; transition: background .4s, border-color .4s, transform .4s var(--ease); opacity: .72; }
.story-step.active { opacity: 1; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); transform: translateX(-6px); }
.story-step .k { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.story-step .k svg { width: 20px; height: 20px; }
.story-step h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 8px; }
.story-step p { color: var(--muted); }

/* ── شاشة بشاشة: سلايدر واحد (صورة + شرح) بيقلب لوحده ──────── */
.carousel { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 8px; }
.car-stage { position: relative; }
.car-stage::before { content: ''; position: absolute; inset: 10% -4% -6% 6%; border-radius: 28px; background: var(--brand-soft); z-index: -1; transform: rotate(-1.5deg); }
.car-shot { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: #0f1b15; box-shadow: var(--shadow-lg); border: 1px solid var(--line); display: grid; place-items: center; }
.car-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity .7s ease, transform 1.2s ease; will-change: opacity, transform; }
.car-img.on { opacity: 1; transform: none; }
.car-img.phone { width: auto; height: 94%; inset: auto; object-fit: contain; object-position: center; border-radius: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.car-arrow { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s ease, background .2s ease; z-index: 2; }
.car-arrow svg { width: 22px; height: 22px; }
.car-arrow.prev { right: -14px; }   /* RTL: السابق يمين */
.car-arrow.next { left: -14px; }
.car-arrow:hover { background: var(--brand); color: #fff; transform: scale(1.06); }
.car-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); overflow: hidden; border-radius: 0 0 var(--r) var(--r); }
.car-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--brand)); }
.carousel.play .car-bar i { animation: carBar var(--car-ms, 4800ms) linear infinite; }
@keyframes carBar { from { width: 0 } to { width: 100% } }
.car-side { position: relative; display: grid; align-content: center; }
.car-text { grid-area: 1 / 1; opacity: 0; transform: translateX(-14px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.car-text.on { opacity: 1; transform: none; pointer-events: auto; position: relative; z-index: 1; }
.car-text h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); font-weight: 800; }
.car-text .n { font-family: var(--font-head); font-weight: 900; color: var(--line-2); font-size: 2.6rem; line-height: 1; display: block; }
.car-text p { margin-top: 8px; }
.car-dots { grid-area: 2 / 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.car-dots button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .2s ease; }
.car-dots button.on, .car-dots button:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.car-dots button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips span { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* ── How it works ────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; position: relative; }
.steps::before { content: ''; position: absolute; top: 34px; inset-inline: 10%; height: 2px; background: linear-gradient(90deg, var(--line-2), var(--brand-2), var(--line-2)); z-index: 0; }
.stp { position: relative; z-index: 1; text-align: center; }
.stp .n { width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); font-family: var(--font-head); font-weight: 900; font-size: 1.3rem; color: var(--brand); transition: transform .4s var(--ease), border-color .3s, box-shadow .3s; }
.stp:hover .n { transform: translateY(-4px) rotate(-4deg); border-color: var(--brand); box-shadow: var(--shadow); }
.stp b { display: block; font-size: 15px; }
.stp p { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ── Notifications ───────────────────────────────────── */
.notif-wrap { position: relative; min-height: 320px; display: grid; align-content: start; gap: 10px; max-width: 420px; margin-inline: auto; }
.notif {
  display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(-18px) scale(.96); transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.notif.show { opacity: 1; transform: none; }
.notif .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; flex: none; }
.notif b { display: block; font-size: 14px; }
.notif small { color: var(--muted); font-size: 12.5px; }
.notif .time { margin-inline-start: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── Interactive demo ────────────────────────────────── */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.demo-xl { max-width: 1120px; margin-inline: auto; padding: 18px; box-shadow: var(--shadow-lg); }
.demo-xl .tabs button { padding: 13px 14px; font-size: 15px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px; background: var(--surface-2); border-radius: 14px; margin-bottom: 14px; }
.tabs button { flex: 1; min-width: 96px; padding: 10px 12px; border-radius: 10px; font-weight: 700; color: var(--ink-2); transition: background .25s, color .25s, box-shadow .25s; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.demo-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: #e9ede5; }
.demo-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.02); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.demo-screen img.on { opacity: 1; transform: none; }
.demo-bar { display: flex; gap: 6px; padding: 0 8px 10px; }
.demo-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.demo-bar i:nth-child(1) { background: #ef7b72; } .demo-bar i:nth-child(2) { background: #f2c14e; } .demo-bar i:nth-child(3) { background: #6ccb7d; }

/* ── Final CTA ───────────────────────────────────────── */
.cta-final { position: relative; overflow: hidden; background: linear-gradient(135deg, #1E6F50, #163f30 70%); color: #fff; border-radius: var(--r-lg); padding: clamp(44px, 7vw, 84px) clamp(22px, 5vw, 72px); text-align: center; }
.cta-final::before { content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(closest-side, rgba(201, 155, 60, .35), transparent); top: -250px; inset-inline-start: -200px; }
.cta-final h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900; position: relative; }
.cta-final p { color: rgba(255, 255, 255, .8); margin-top: 12px; font-size: 1.1rem; position: relative; }
.cta-final .hero-cta { justify-content: center; position: relative; }

/* ── Footer ──────────────────────────────────────────── */
.footer { padding: 56px 0 28px; border-top: 1px solid var(--line); margin-top: clamp(48px, 7vw, 96px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; }
.footer h4 { font-size: 15px; margin-bottom: 12px; }
.footer a { display: block; color: var(--muted); font-size: 14.5px; padding: 4px 0; transition: color .2s; }
.footer a:hover { color: var(--brand); }
.footer .about { color: var(--muted); font-size: 14px; max-width: 380px; margin-top: 10px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ── Reveal ──────────────────────────────────────────── */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
/* الهيرو بيظهر بـCSS من أول فريم — مش مستني الـJS (LCP) */
[data-reveal="hero"] { opacity: 1; transform: none; transition: none; animation: heroIn .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } }
[data-reveal="left"] { transform: translateX(-30px); }
[data-reveal="right"] { transform: translateX(30px); }
[data-reveal="scale"] { transform: scale(.94); }
[data-reveal].in { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1099px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .phones { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { gap: 28px; }
  .f3 { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .split, .story, .carousel { grid-template-columns: 1fr; }
  .split.rev > .shot-wrap { order: 0; }
  .car-arrow { width: 38px; height: 38px; }
  .car-arrow.prev { right: 8px; }
  .car-arrow.next { left: 8px; }
  .car-stage::before { inset: 8% 0 -4% 0; }
  .car-text .n { font-size: 1.8rem; }
  .car-dots { margin-top: 14px; }
  .story-visual { position: relative; top: 0; }
  .story-step { opacity: 1; }
  .comp { margin-top: 10px; aspect-ratio: 1 / .8; }
  .f2 { display: none; }
}
@media (max-width: 767px) {
  .nav, .header .btn-primary { display: none; }
  .burger { display: grid; }
  .mobile-menu { display: block; pointer-events: none; }
  .mobile-menu.open { pointer-events: auto; }
  .features { grid-template-columns: 1fr; }
  .feature.wide { grid-column: auto; }
  .checks { grid-template-columns: 1fr; }
  .counters { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .counter { padding: 12px 8px; }
  .phones { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; padding: 6px 0 18px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); -webkit-overflow-scrolling: touch; }
  .phones > div { flex: 0 0 62%; scroll-snap-align: center; }
  .phones .phone { transform: none; opacity: 1; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hot { width: 24px; height: 24px; }
  /* على الموبايل التلميح بيظهر كشريط ثابت تحت الشاشة بدل ما يتقص */
  .hot .tip { position: fixed; inset-inline: 14px; bottom: 14px; width: auto; transform: translateY(8px); z-index: 60; font-size: 13px; }
  .hot:hover .tip, .hot.open .tip, .hot:focus-within .tip { transform: none; }
  .crm-grid { grid-template-columns: 1fr 1fr; }
  .comp .phone { max-width: 120px; }
  .fcard { min-width: 0; padding: 8px 10px; }
  .fcard .v { font-size: 13px; }
  .fcard .t { font-size: 11px; }
  .f4 { display: none; }
  .pts-fly.go { animation-name: fly-sm; }
  @keyframes fly-sm { 0% { opacity: 0; transform: translate(0, 10px) scale(.9); } 15% { opacity: 1; transform: none; } 60% { opacity: 1; transform: translate(-60px, 60px); } 75% { opacity: 0; transform: translate(-80px, 80px) scale(.6); } 100% { opacity: 0; } }
}
/* ── اختصار للموبايل: الميزات كشبكة مضغوطة، التابس صفّين منظّمين، الحضور أقصر ── */
@media (max-width: 767px) {
  .m-hide { display: none !important; }
  .glow-ring { display: block; }
  .glow-ring .btn { width: 100%; }
  .btn-lg { padding: 14px 18px; font-size: 15.5px; }
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .feature { padding: 14px 12px; border-radius: 16px; }
  .feature .ico { width: 38px; height: 38px; border-radius: 11px; margin-bottom: 10px; }
  .feature .ico svg { width: 19px; height: 19px; }
  .feature h3 { font-size: .95rem; margin-bottom: 0; }
  .feature p { display: none; }
  .feature.wide { grid-column: span 2; padding: 16px 14px; }
  .feature.wide h3 { margin-bottom: 6px; }
  .feature.wide p { display: block; font-size: 13px; line-height: 1.6; }
  .tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .tabs button, .demo-xl .tabs button { min-width: 0; padding: 10px 6px; font-size: 13.5px; }
  .demo-xl { padding: 10px; border-radius: 20px; }
  .flow { flex-direction: row; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
  .flow .arrow { display: none; }
  .flow .step { flex: 1 1 calc(50% - 6px); padding: 10px 8px; display: flex; align-items: center; gap: 8px; text-align: start; }
  .flow .step:last-child { flex-basis: 100%; }
  .flow .step .n { width: 26px; height: 26px; font-size: 12.5px; margin: 0; flex: none; }
  .flow .step b { font-size: 13px; }
  .statuses { gap: 6px; margin-top: 12px; }
  .status { padding: 6px 10px; font-size: 12.5px; }
  #attendance .split { margin-top: 24px !important; gap: 18px; }
  #attendance .counters { margin-top: 18px; }
}
@media (max-width: 420px) {
  :root { --gutter: 14px; }
  .hero-cta .btn { width: 100%; }
  .counters { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .counter { padding: 10px 6px; }
  .counter b { font-size: 1.3rem; }
  .counter span { font-size: 11px; }
  .steps { grid-template-columns: 1fr; }
  .phones > div { flex-basis: 78%; }
}

/* ── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .phones .phone { transform: none; opacity: 1; }
  .story-stack img { transition: none; }
}
