/* Mshwar public site — app palette (#12B8C4 / #167077 / #013852), RTL first. */
:root {
  --brand: #12b8c4;
  --brand-600: #0e9aa5;
  --brand-700: #167077;
  --brand-900: #013852;
  --brand-50: #e8f8f9;
  --brand-100: #c9eff2;
  --accent: #fbb03b;
  --ink: #1f2724;
  --ink-2: #4b4e4b;
  --muted: #78817e;
  --line: #e4e9e7;
  --bg: #ffffff;
  --bg-soft: #f6fbfb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(1, 56, 82, .06);
  --shadow: 0 12px 32px rgba(1, 56, 82, .10);
  --shadow-lg: 0 24px 60px rgba(1, 56, 82, .18);
  --container: 1180px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
html, body { overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.skip-link { position: absolute; inset-inline-start: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { inset-inline-start: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 15px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(18, 184, 196, .35); }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { border-color: var(--brand); color: var(--brand-700); background: transparent; }
.btn-outline:hover { background: var(--brand-50); }
.btn-light { background: #fff; color: var(--brand-700); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .12); }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 20px 8px 22px;
  border-radius: 14px; background: #0b1f26; color: #fff; transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.store-badge:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.store-badge svg { width: 26px; height: 26px; flex: none; }
.store-badge small { display: block; font-size: 11px; opacity: .8; line-height: 1.2; }
.store-badge strong { display: block; font-size: 17px; line-height: 1.25; font-family: "Segoe UI", system-ui, sans-serif; }
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badges.stack { flex-direction: column; align-items: stretch; max-width: 210px; }
.store-badges.stack .store-badge { justify-content: flex-start; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { height: 42px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--ink-2); font-size: 15px; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-700); background: var(--brand-50); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav-links, .nav-actions .btn-outline { display: none; }
  .nav-toggle { display: inline-flex; }
}

.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; overflow: hidden; }
.drawer.is-open { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(1, 56, 82, .45); opacity: 0; transition: opacity .25s ease; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; inset-block: 0; inset-inline-start: 0; width: min(320px, 86vw); background: #fff;
  padding: 24px; display: flex; flex-direction: column; gap: 6px; transform: translateX(100%); transition: transform .25s ease;
  box-shadow: var(--shadow-lg);
}
[dir="ltr"] .drawer-panel { transform: translateX(-100%); }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-panel a { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.drawer-panel a:hover { background: var(--brand-50); color: var(--brand-700); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-head img { height: 36px; width: auto; }
.drawer-panel .btn { margin-top: 10px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, .18), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(1, 56, 82, .55), transparent 70%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 45%, var(--brand-700) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .9) 1.2px, transparent 1.2px);
  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-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; padding-block: 80px 120px; }
.hero h1 { color: #fff; font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.5px; margin-bottom: 18px; }
.hero h1 .hl { color: #fff; background: linear-gradient(transparent 80%, var(--accent) 80%, var(--accent) 92%, transparent 92%); padding-inline: 2px; }
.hero p.lead { font-size: clamp(16px, 2vw, 19px); color: rgba(255, 255, 255, .92); max-width: 560px; margin-bottom: 30px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); font-size: 14px; font-weight: 600; margin-bottom: 20px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(251, 176, 59, .25); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; padding: 0; list-style: none; font-size: 15px; color: rgba(255, 255, 255, .92); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points svg { width: 18px; height: 18px; color: var(--accent); }
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual img.phone { width: min(560px, 100%); filter: drop-shadow(0 40px 60px rgba(1, 56, 82, .45)); animation: float 7s ease-in-out infinite; }
.hero-card {
  position: absolute; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink);
  padding: 12px 16px; border-radius: 16px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600;
}
.hero-card .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.hero-card .ic svg { width: 20px; height: 20px; }
.hero-card small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.hero-card.c1 { top: 12%; inset-inline-end: 0; }
.hero-card.c2 { bottom: 14%; inset-inline-start: 4%; }
.hero-wave { position: absolute; inset-inline: 0; bottom: -1px; width: 100%; height: 90px; color: var(--bg); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .hero-visual img.phone { animation: none; } }
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-block: 56px 110px; }
  .hero p.lead { margin-inline: auto; }
  .store-badges, .hero-points { justify-content: center; }
  .hero-card { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: 96px; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.kicker { display: inline-block; color: var(--brand-700); background: var(--brand-50); font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.section-head h2, .h-section { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
.lead-muted { color: var(--muted); font-size: 17px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
@media (max-width: 700px) { .section { padding-block: 64px; } .section-head { margin-bottom: 36px; } }

.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.icon-tile {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); color: var(--brand-700);
}
.icon-tile svg { width: 28px; height: 28px; }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.step { position: relative; text-align: center; padding: 30px 22px; }
.step .num {
  counter-increment: step; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--brand-700); font-weight: 800; font-size: 22px; box-shadow: var(--shadow); border: 2px solid var(--brand-100);
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 18px; }
.step p { color: var(--muted); font-size: 15px; margin: 0; }
@media (min-width: 961px) {
  .steps::before { content: ""; position: absolute; top: 62px; inset-inline: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--brand-100) 0 10px, transparent 10px 18px); }
}
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Split (delegates / merchants) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-media { order: -1; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 36px; } .split.reverse .split-media { order: 0; } }
.check-list { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.check-list svg { flex: none; width: 24px; height: 24px; color: var(--brand); margin-top: 2px; }
.check-list strong { color: var(--ink); }
.media-frame {
  position: relative; border-radius: 28px; padding: 36px; overflow: hidden;
  background: linear-gradient(160deg, var(--brand-50), #fff 60%); border: 1px solid var(--line);
}
.media-frame img { margin-inline: auto; max-height: 480px; width: auto; filter: drop-shadow(0 24px 40px rgba(1, 56, 82, .22)); }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { padding: 8px 14px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-weight: 600; font-size: 14px; }

/* Screens gallery */
.screens { display: flex; gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 4px 26px; scrollbar-width: thin; }
.screens::-webkit-scrollbar { height: 8px; }
.screens::-webkit-scrollbar-thumb { background: var(--brand-100); border-radius: 8px; }
.screen {
  flex: 0 0 auto; scroll-snap-align: center; width: 220px; border-radius: 30px; padding: 10px; background: #0b1f26;
  box-shadow: var(--shadow); transition: transform .2s ease;
}
.screen:hover { transform: translateY(-6px); }
.screen img { border-radius: 22px; width: 100%; }
.screens-nav { display: flex; justify-content: center; gap: 10px; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--brand-700); transition: background .2s ease; }
.icon-btn:hover { background: var(--brand-50); }
.icon-btn svg { width: 20px; height: 20px; }

/* Video */
.video-card {
  position: relative; display: block; width: 100%; border-radius: 26px; overflow: hidden; border: 0; padding: 0;
  box-shadow: var(--shadow-lg); background: var(--brand-900);
}
.video-card img { width: 100%; opacity: .92; }
.video-card .play {
  position: absolute; inset: 0; margin: auto; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--brand-700); box-shadow: 0 0 0 14px rgba(255, 255, 255, .25); transition: transform .2s ease;
}
.video-card:hover .play { transform: scale(1.07); }
.video-card .play svg { width: 34px; height: 34px; margin-inline-start: 4px; }
.modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(1, 25, 35, .8); }
.modal.is-open { display: flex; }
.modal-box { position: relative; width: min(960px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 18px; overflow: hidden; }
.modal-box iframe { width: 100%; height: 100%; border: 0; }
.modal-close { position: absolute; top: -52px; inset-inline-end: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; }

/* CTA band */
.cta {
  position: relative; overflow: hidden; border-radius: 32px; padding: 56px; color: #fff;
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center;
  background: linear-gradient(135deg, var(--brand-700), var(--brand) 70%);
}
.cta::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; inset-inline-start: -120px; top: -160px; background: rgba(255, 255, 255, .08); }
.cta h2 { color: #fff; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; }
.cta p { color: rgba(255, 255, 255, .9); font-size: 17px; }
.cta img { position: relative; z-index: 1; max-height: 300px; width: auto; margin-inline: auto; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; text-align: center; padding: 40px 24px; } .cta .store-badges { justify-content: center; } .cta img { display: none; } }

/* ---------- Inner pages ---------- */
.page-hero { background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; padding-block: 64px 70px; text-align: center; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin: 0; }
.page-hero p { color: rgba(255, 255, 255, .88); margin: 10px 0 0; }
.page-body { margin-top: -36px; padding-bottom: 80px; }
.prose-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow); color: var(--ink-2); }
.prose-card h2, .prose-card h3 { color: var(--ink); margin-top: 1.4em; }
.prose-card ul, .prose-card ol { padding-inline-start: 1.4em; }
.prose-card a { color: var(--brand-700); text-decoration: underline; }

.faq-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 28px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: all .15s ease; }
.chip:hover { border-color: var(--brand); color: var(--brand-700); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.faq-list { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .2s ease, border-color .2s ease; }
.faq-item[open] { border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; font-weight: 700; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); transition: transform .2s ease; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item summary .chev svg { width: 16px; height: 16px; }
.faq-item .answer { padding: 0 22px 20px; color: var(--muted); }
.faq-item.is-hidden { display: none; }

.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps-list li { counter-increment: s; position: relative; padding: 18px 22px; padding-inline-start: 74px; background: var(--bg-soft); border-radius: 16px; border: 1px solid var(--line); }
.steps-list li::before { content: counter(s); position: absolute; inset-inline-start: 18px; top: 16px; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; display: grid; place-items: center; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: #fff7e8; border: 1px solid #fde3b4; color: #7a5410; margin-top: 22px; }
.notice svg { flex: none; width: 22px; height: 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .78); padding-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: #fff; }
.footer-brand img { height: 54px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 15px; max-width: 360px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff; transition: background .2s ease; }
.socials a:hover { background: var(--brand); }
.socials svg { width: 19px; height: 19px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } .footer-bottom { justify-content: center; text-align: center; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }
