/* RAYVO RESTAURANT — صفحة تعريفية ثابتة. لا اعتماد على خادم ولا شبكة.
   الخطوط محلية (OFL)، والألوان من هوية MASAR. الاتجاه RTL/LTR عبر الخصائص المنطقية. */

@font-face { font-family: "Alexandria"; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/alexandria-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "Alexandria"; font-weight: 100 900; font-display: swap;
  src: url("../assets/fonts/alexandria-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ivory: #f6efe7; --sand: #eadbcd; --beige: #d8bcad;
  --espresso: #1b0e07; --night: #140a05; --ink: #241107;
  --bronze: #8a4a1c; --bronze-deep: #5b2c0a; --copper: #c26a1e; --gold: #ffc661;
  --muted: #6e5546; --sand-muted: #cdb5a3;
  --leaf: #1f4d3a;
  --line: rgb(36 17 7 / 14%); --line-dark: rgb(246 239 231 / 18%);
  --radius: 18px; --wrap: 1180px; --pad: clamp(18px, 4.5vw, 44px);
  --head: "Alexandria", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", "Alexandria", system-ui, sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --shadow: 0 30px 60px -28px rgb(27 14 7 / 45%), 0 8px 20px -10px rgb(27 14 7 / 25%);
  --header-h: 68px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 400 1.0625rem/1.75 var(--body); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.25; letter-spacing: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: min(100% - var(--pad) * 2, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--espresso); color: var(--ivory); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 10px; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; border-radius: 6px; }
.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent; text-decoration: none; font-weight: 600; font-size: 1rem; transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s, box-shadow .25s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--espresso); color: var(--ivory); box-shadow: 0 12px 24px -12px rgb(27 14 7 / 60%); }
.btn-primary:hover { background: var(--bronze-deep); }
.btn-ghost { border-color: var(--line); background: rgb(255 255 255 / 45%); color: var(--ink); }
.btn-ghost:hover { border-color: var(--bronze); background: #fff; }
.btn-gold { background: var(--gold); color: var(--espresso); }
.btn-gold:hover { background: #ffd384; }
.btn-line-light { border-color: var(--line-dark); color: var(--ivory); }
.btn-line-light:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .92rem; }
.btn[aria-disabled="true"] { opacity: .62; cursor: not-allowed; pointer-events: auto; transform: none; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* ---------- الترويسة ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgb(246 239 231 / 82%); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color .3s, background .3s; }
.site-header.scrolled { border-color: var(--line); background: rgb(246 239 231 / 94%); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--espresso); direction: ltr; }
.lockup .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--espresso); color: var(--gold); display: grid; place-items: center; }
.lockup .mark svg { width: 20px; height: 20px; fill: currentColor; }
.lockup .words { display: grid; line-height: 1; }
.lockup .words b { font: 700 1.15rem/1 var(--head); letter-spacing: .08em; }
.lockup .words i { font: 600 .6rem/1 var(--head); font-style: normal; letter-spacing: .34em; color: var(--bronze); margin-top: 4px; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; color: var(--muted); transition: color .2s, background .2s; }
.nav a:hover, .nav a.active { color: var(--espresso); background: rgb(36 17 7 / 7%); }
.head-tools { display: flex; align-items: center; gap: 10px; }
.lang { min-height: 40px; min-width: 56px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; font-weight: 600; font-size: .9rem; }
.lang:hover { border-color: var(--bronze); }
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: transparent; place-items: center; }
@media (max-width: 1040px) {
  .nav { position: fixed; inset-inline: 0; top: var(--header-h); flex-direction: column; background: var(--ivory); padding: 12px var(--pad) 22px; border-bottom: 1px solid var(--line); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .25s var(--ease); margin: 0; }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .burger { display: grid; }
  .head-tools { margin-inline-start: auto; }
  .head-tools .btn { display: none; }
}

/* ---------- الإطارات: جوال / لوح / متصفح ---------- */
.phone { position: relative; width: min(100%, 300px); aspect-ratio: 390 / 844; border-radius: 44px; background: #0f0a07; padding: 9px; box-shadow: var(--shadow), inset 0 0 0 1.5px #3a2a20; }
.phone::before { content: ""; position: absolute; top: 15px; inset-inline: 0; margin-inline: auto; width: 84px; height: 22px; border-radius: 12px; background: #0f0a07; z-index: 3; }
.phone .screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: #f4ede4; }
.tablet { position: relative; width: min(100%, 440px); aspect-ratio: 880 / 1350; border-radius: 28px; background: #0f0a07; padding: 9px; box-shadow: var(--shadow), inset 0 0 0 1.5px #3a2a20; }
.tablet .screen { position: relative; height: 100%; border-radius: 20px; overflow: hidden; background: #111; }
.browser { position: relative; width: 100%; border-radius: 14px; background: #1c1713; box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgb(255 255 255 / 10%); }
.browser .bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #2a211b; direction: ltr; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: #5a4a3e; }
.browser .bar i:nth-child(1) { background: #c9604a; } .browser .bar i:nth-child(2) { background: #d6a647; } .browser .bar i:nth-child(3) { background: #5b9b6a; }
.browser .bar span { margin-inline-start: 12px; flex: 1; max-width: 340px; height: 18px; border-radius: 9px; background: #3a2e26; color: #9d8a7b; font-size: .68rem; line-height: 18px; text-align: center; font-family: var(--head); letter-spacing: .02em; }
.browser .screen { position: relative; aspect-ratio: 1800 / 1125; }
.screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .28s ease, transform .5s var(--ease); }
.screen img.swap { opacity: 0; transform: scale(1.015); }
.screen img.pan { animation: pan 9s ease-in-out infinite alternate; object-position: 50% 0; }
@keyframes pan { 0%, 8% { object-position: 50% 0; } 92%, 100% { object-position: 50% 100%; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(36px, 6vw, 84px) clamp(56px, 8vw, 110px); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px; background: radial-gradient(closest-side, rgb(255 198 97 / 38%), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto auto -30% -15%; width: 55vw; height: 55vw; max-width: 700px; max-height: 700px; background: radial-gradient(closest-side, rgb(31 77 58 / 12%), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 70px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; background: rgb(138 74 28 / 10%); color: var(--bronze-deep); font-size: .9rem; font-weight: 600; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--copper); box-shadow: 0 0 0 4px rgb(194 106 30 / 22%); }
.hero h1 { font-size: clamp(2.05rem, 4.6vw, 3.7rem); font-weight: 700; margin-top: 20px; color: var(--espresso); }
.hero h1 em { font-style: normal; color: var(--bronze); background: linear-gradient(transparent 62%, rgb(255 198 97 / 55%) 62%); }
.hero .lead { margin-top: 20px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.demo-note { margin-top: 18px; font-size: .88rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; max-width: 36em; }
.demo-note .ico { margin-top: 4px; color: var(--bronze); }
.hero-visual { position: relative; min-height: clamp(380px, 54vw, 600px); }
.hero-visual .browser { position: absolute; inset-inline-start: 0; top: 7%; width: 92%; transform: rotate(-1.5deg); }
[dir="ltr"] .hero-visual .browser { transform: rotate(1.5deg); }
.hero-visual .phone { position: absolute; inset-inline-end: 2%; bottom: 0; width: clamp(180px, 25vw, 250px); z-index: 2; animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { translate: 0 -12px; } }
.chip { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 30px -16px rgb(27 14 7 / 45%); font-size: .86rem; font-weight: 600; color: var(--espresso); }
.chip .ico { color: var(--copper); }
.chip.c1 { top: 0; inset-inline-end: 6%; animation: float 8s ease-in-out infinite .6s; }
.chip.c2 { bottom: 20%; inset-inline-start: -2%; animation: float 9s ease-in-out infinite 1.4s; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 540px; order: 2; margin-top: 12px; }
  .chip.c2 { inset-inline-start: 0; }
}
@media (max-width: 520px) { .hero-visual { min-height: 470px; } .chip.c1 { inset-inline-end: 0; } .btn { white-space: normal; text-align: center; } }

/* ---------- شريط الحقائق ---------- */
.facts { background: var(--espresso); color: var(--ivory); }
.facts ul { list-style: none; margin: 0; padding: 26px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 24px; }
.facts li { display: flex; flex-direction: column; gap: 2px; padding-inline-start: 18px; border-inline-start: 2px solid var(--copper); }
.facts b { font: 700 clamp(1.4rem, 2.6vw, 1.9rem)/1.2 var(--head); color: var(--gold); }
.facts span { font-size: .92rem; color: var(--sand-muted); }
@media (max-width: 760px) { .facts ul { grid-template-columns: 1fr 1fr; } }

/* ---------- أقسام عامة ---------- */
section { position: relative; }
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.kicker { display: inline-block; font: 600 .82rem/1 var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); margin-bottom: 14px; }
.sec h2 { font-size: clamp(1.75rem, 3.6vw, 2.7rem); font-weight: 700; color: var(--espresso); }
.sec .sub { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }
.dark { background: var(--night); color: var(--ivory); }
.dark h2 { color: var(--ivory); } .dark .sub { color: var(--sand-muted); } .dark .kicker { color: var(--gold); }
.sand { background: var(--sand); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, .no-anim .reveal { opacity: 1; transform: none; transition: none; }

/* ---------- المنيو: سرد متدرج ---------- */
.story { display: grid; grid-template-columns: 1fr minmax(280px, 340px); gap: clamp(30px, 6vw, 90px); align-items: start; }
.story-sticky { position: sticky; top: calc(var(--header-h) + 28px); display: grid; place-items: center; order: 2; }
.story-steps { order: 1; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 6px 18px; padding: 26px 0 26px; min-height: 34vh; border-bottom: 1px solid var(--line); opacity: .4; transition: opacity .4s; align-content: center; }
.step:last-child { border-bottom: 0; }
.step.active { opacity: 1; }
.step .num { grid-row: span 3; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font: 700 1.1rem var(--head); border: 1.5px solid var(--line); background: #fff; color: var(--bronze); transition: .35s var(--ease); }
.step.active .num { background: var(--espresso); color: var(--gold); border-color: var(--espresso); transform: scale(1.08); }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--muted); }
.step .tag { display: inline-flex; width: fit-content; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: rgb(31 77 58 / 10%); color: var(--leaf); font-size: .82rem; font-weight: 600; }
.step .inline-shot { display: none; }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-sticky { display: none; }
  .step { min-height: 0; opacity: 1; grid-template-columns: 1fr; padding-block: 34px; }
  .step .num { grid-row: auto; margin-bottom: 8px; }
  .step .inline-shot { display: grid; place-items: center; margin-top: 20px; }
}

/* ---------- الولاء ---------- */
.loy { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: clamp(28px, 6vw, 90px); align-items: center; }
.loy-stage { position: relative; display: grid; place-items: center; padding: 30px 0; }
.loy-stage::before { content: ""; position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 198 97 / 30%), transparent 72%); }
.loy-stage .phone { z-index: 1; }
.loy-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.loy-list button { width: 100%; text-align: start; display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; padding: 18px 20px; border-radius: 16px; background: transparent; border: 1.5px solid var(--line-dark); transition: .3s var(--ease); color: inherit; position: relative; overflow: hidden; }
.loy-list button:hover { border-color: rgb(255 198 97 / 55%); }
.loy-list button[aria-selected="true"] { background: rgb(255 198 97 / 10%); border-color: var(--gold); }
.loy-list .n { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgb(246 239 231 / 8%); color: var(--gold); }
.loy-list strong { font: 600 1.1rem var(--head); }
.loy-list span.d { color: var(--sand-muted); font-size: .96rem; display: none; }
.loy-list button[aria-selected="true"] span.d { display: block; }
.loy-list .progress { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: right; }
[dir="ltr"] .loy-list .progress { transform-origin: left; }
.loy-list button[aria-selected="true"] .progress.run { animation: fill var(--dur, 6s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }
.loy-rules { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-dark); font-size: .9rem; color: var(--sand-muted); }
.pill b { color: var(--gold); font-weight: 600; }
@media (max-width: 900px) { .loy { grid-template-columns: 1fr; } .loy-stage { order: -1; } }

/* ---------- المحطة واللوحة ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 14px; scrollbar-width: thin; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.tab-group { display: flex; gap: 8px; flex: none; align-items: center; padding-inline-end: 14px; margin-inline-end: 6px; border-inline-end: 1px solid var(--line); }
.tab-group:last-child { border: 0; }
.tab-group .gl { font: 600 .74rem var(--head); letter-spacing: .08em; color: var(--bronze); padding-inline-end: 4px; white-space: nowrap; }
.tab { flex: none; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: rgb(255 255 255 / 55%); font-weight: 600; font-size: .92rem; transition: .25s var(--ease); white-space: nowrap; }
.tab:hover { border-color: var(--bronze); }
.tab[aria-selected="true"] { background: var(--espresso); color: var(--ivory); border-color: var(--espresso); }
@media (min-width: 901px) {
  .tabs { flex-direction: column; align-items: flex-start; overflow: visible; gap: 10px; }
  .tab-group { flex-wrap: wrap; border: 0; margin: 0; padding: 0; }
  .tab-group .gl { min-width: 4.2em; }
}
.viewer { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 18px; }
.viewer-frame { display: grid; place-items: center; min-height: 300px; }
.viewer-frame .browser { max-width: 820px; }
.viewer-frame .tablet { max-height: 640px; width: auto; height: min(640px, 76vh); }
.viewer-text h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.viewer-text p { margin-top: 12px; color: var(--muted); }
.viewer-text ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.viewer-text li { display: flex; gap: 10px; align-items: flex-start; }
.viewer-text li .ico { color: var(--leaf); margin-top: 5px; }
.badge-sim { display: inline-flex; margin-top: 16px; padding: 5px 14px; border-radius: 999px; background: rgb(194 106 30 / 14%); color: var(--bronze-deep); font-size: .84rem; font-weight: 600; }
@media (max-width: 900px) { .viewer { grid-template-columns: 1fr; } .viewer-text { order: 2; } .viewer-frame .tablet { height: auto; width: min(100%, 360px); } }

/* ---------- رحلة النظام ---------- */
.track { margin-top: 12px; }
.track + .track { margin-top: 56px; }
.track h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.track h3 .ico { color: var(--copper); }
.chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 0; counter-reset: c; position: relative; }
.chain li { position: relative; text-align: center; padding: 0 8px; }
.chain .node { width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--bronze); position: relative; z-index: 1; transition: .4s var(--ease); box-shadow: 0 10px 24px -14px rgb(27 14 7 / 40%); }
.chain .node .ico { width: 28px; height: 28px; }
.chain li.in .node { background: var(--espresso); color: var(--gold); border-color: var(--espresso); }
.chain li::before { content: ""; position: absolute; top: 33px; inset-inline-start: 50%; width: 100%; height: 2px; background: repeating-linear-gradient(90deg, var(--beige) 0 6px, transparent 6px 12px); }
.chain li:last-child::before { display: none; }
.chain strong { display: block; font: 600 1rem var(--head); }
.chain span { display: block; font-size: .88rem; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.chain li.end .node { background: var(--leaf); color: #fff; border-color: var(--leaf); }
.chain li.dim .node { border-style: dashed; background: transparent; }
.track-note { margin-top: 22px; display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .95rem; padding: 14px 18px; border-radius: 14px; background: rgb(255 255 255 / 50%); border: 1px dashed var(--beige); }
.track-note .ico { color: var(--bronze); margin-top: 4px; }
@media (max-width: 880px) {
  .chain { grid-template-columns: 1fr; gap: 6px; }
  .chain li { display: grid; grid-template-columns: 68px 1fr; gap: 0 16px; text-align: start; padding: 0; align-items: center; }
  .chain .node { margin: 0; grid-row: 1 / span 2; grid-column: 1; }
  .chain strong { grid-column: 2; grid-row: 1; align-self: end; }
  .chain span { grid-column: 2; grid-row: 2; align-self: start; margin-top: 2px; }
  .chain li::before { top: 68px; inset-inline-start: 33px; width: 2px; height: calc(100% - 62px); background: repeating-linear-gradient(180deg, var(--beige) 0 6px, transparent 6px 12px); }
  .chain li { padding-bottom: 22px; }
}

/* ---------- المميزات ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fcard { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; position: relative; overflow: hidden; }
.fcard::after { content: ""; position: absolute; inset-inline-end: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 198 97 / 30%), transparent); opacity: 0; transition: opacity .4s; }
.fcard:hover { transform: translateY(-6px); box-shadow: 0 26px 40px -26px rgb(27 14 7 / 40%); border-color: var(--beige); }
.fcard:hover::after { opacity: 1; }
.fcard .fi { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--espresso); color: var(--gold); margin-bottom: 18px; }
.fcard .fi .ico { width: 26px; height: 26px; }
.fcard h3 { font-size: 1.12rem; margin-bottom: 8px; }
.fcard p { color: var(--muted); font-size: .98rem; line-height: 1.7; }
.fcard .sim { display: inline-block; margin-inline-start: 6px; padding: 1px 10px; border-radius: 999px; background: rgb(194 106 30 / 14%); color: var(--bronze-deep); font: 600 .72rem var(--body); vertical-align: middle; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.scope { margin-top: 34px; display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 26px 28px; border-radius: var(--radius); background: var(--espresso); color: var(--ivory); }
.scope .ico { width: 34px; height: 34px; color: var(--gold); margin-top: 4px; }
.scope h3 { font-size: 1.15rem; color: var(--gold); margin-bottom: 8px; }
.scope p { color: var(--sand-muted); font-size: .98rem; }
.scope ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.scope li { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-dark); font-size: .88rem; }

/* ---------- العرض التفاعلي والخاتمة ---------- */
.demo { text-align: center; }
.demo .box { max-width: 50rem; margin-inline: auto; padding: clamp(30px, 5vw, 54px); border-radius: 26px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.demo h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.demo p { margin-top: 12px; color: var(--muted); }
.demo .btn { margin-top: 24px; }
.demo .pending { margin-top: 16px; font-size: .92rem; color: var(--bronze-deep); background: rgb(194 106 30 / 10%); border-radius: 12px; padding: 12px 16px; display: none; }
.demo-off .pending { display: block; }

.closing { background: var(--night); color: var(--ivory); text-align: center; overflow: hidden; }
.closing::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 0%, rgb(255 198 97 / 18%), transparent 70%); pointer-events: none; }
.closing .wrap { position: relative; }
.closing .big { font: 700 clamp(2.4rem, 8.5vw, 6.2rem)/1 var(--head); letter-spacing: .06em; direction: ltr; background: linear-gradient(180deg, #fff 20%, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.closing .big small { display: block; font-size: .26em; letter-spacing: .5em; margin-top: 14px; -webkit-text-fill-color: var(--sand-muted); }
.closing h2 { margin-top: 30px; font-size: clamp(1.25rem, 2.6vw, 1.8rem); font-weight: 500; line-height: 1.7; color: var(--ivory); }
.closing h2 span { display: block; color: var(--sand-muted); }
.closing .cta-row { justify-content: center; }
.credit { margin: 54px auto 0; display: inline-flex; align-items: center; gap: 18px; padding: 16px 26px; border-radius: 20px; background: var(--ivory); color: var(--ink); text-align: start; }
.credit img { width: 58px; height: auto; }
.credit small { display: block; color: var(--muted); font-size: .84rem; }
.credit b { font: 600 1.05rem var(--head); }
.foot { background: #0e0703; color: var(--sand-muted); padding: 22px 0; font-size: .85rem; text-align: center; }
.foot p + p { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .screen img.pan { object-position: 50% 0; }
}
