/* Ali Mohamed brand tokens (from the «Ali Mohamed» design system) */
:root {
  color-scheme: light;
  --surface: #ffffff;
  --surface-soft: #f2f5f8;
  --line: #d5dce6;
  --ink: #1d2e55;
  --ink-muted: #4a5878;
  --navy: #1d2e55;
  --navy-deep: #1e2a48;
  --navy-card: #273759;
  --navy-line: #3a4c70;
  --on-dark-muted: #b9c4d6;
  --green: #13885a;
  --green-ink: #0e6b47;
  --green-tint: #e6f4ed;
  --mint: #66deba;
  --stop: #c81e1e;
  --stop-tint: #fdecec;
  --cat-sales: #e42424;
  --cat-accounting: #783066;
  --cat-inventory: #f67e18;
  --on-cat-inventory: #1d2e55;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-pill: 9999px;
  --shadow: 0 10px 30px -12px rgba(29, 46, 85, .28);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font: Cairo, "Segoe UI", Tahoma, sans-serif;
  --latin: Montserrat, "Segoe UI", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.8 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--green-ink); }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 800; }
p { margin: 0 0 .8em; }
code {
  font-family: var(--mono); font-size: .86em;
  background: var(--surface-soft); border: 1px solid var(--line);
  border-radius: 6px; padding: 0 .35em;
  direction: ltr; unicode-bidi: isolate;
}
:focus-visible { outline: 3px solid var(--green-ink); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }

.skip { position: absolute; inset-inline-start: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 16px; border-radius: var(--radius-sm); z-index: 20; }
.skip:focus { inset-inline-start: 8px; }

/* ---------- header */
.topbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: auto; }
.wordmark { font: 700 1.15rem/1 var(--latin); letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { color: var(--navy); font-weight: 700; }
.wordmark i { color: var(--green); font-style: normal; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 10px; border-radius: var(--radius-sm); min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--surface-soft); }
.nav .nav-yt { border: 2px solid var(--navy); border-radius: var(--radius-pill); padding: 6px 16px; min-height: 40px; }
.nav .nav-yt:hover { background: var(--navy); color: #fff; }
@media (max-width: 480px) {
  .wordmark { display: none; }
  .nav a { padding: 8px; font-size: .9rem; }
  .nav .nav-yt { padding: 4px 12px; }
}

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 26px; border-radius: var(--radius-pill);
  font: 700 1rem/1.3 var(--font); text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 6px 16px -8px rgba(29,46,85,.6); }
.btn-primary:hover { background: #142244; box-shadow: 0 10px 22px -10px rgba(29,46,85,.7); }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--surface-soft); }
.btn-green { background: var(--mint); color: var(--navy); }
.btn-green:hover { background: #82e7c9; }
.btn-soft { background: var(--green-tint); color: var(--green-ink); }
.btn-soft:hover { background: #d3ecdf; }
.btn-sm { min-height: 40px; padding: 6px 16px; font-size: .92rem; }
.btn-block { width: 100%; }

/* ---------- hero */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; background: linear-gradient(180deg, #fff 0%, #fff 55%, var(--surface-soft) 100%); }
.hero::before, .hero::after {
  content: ""; position: absolute; inset-inline-end: -90px; height: 30px;
  border-radius: var(--radius-pill); transform: rotate(-38deg); pointer-events: none;
}
.hero::before { top: 46px; width: 380px; background: var(--navy); }
.hero::after { top: 100px; width: 290px; background: var(--green); }
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 900; line-height: 1.15; letter-spacing: -.01em; margin-bottom: 20px; }
.hl { color: var(--green-ink); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-muted); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero-note { color: var(--ink-muted); font-size: .92rem; font-weight: 600; margin: 0; }

.hero-proof { margin: 0; display: grid; gap: 14px; }
.hero-proof figcaption { font-size: .85rem; font-weight: 600; color: var(--ink-muted); text-align: center; }
.proof {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none;
  animation: rise .9s var(--ease-out) both; animation-delay: calc(var(--i) * 140ms + 120ms);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.proof:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -14px rgba(29,46,85,.36); }
@media (min-width: 960px) {
  .proof-stop { margin-inline-end: 44px; }
  .proof-ok { margin-inline-start: 44px; }
}
.proof-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.proof-icon svg { width: 22px; height: 22px; stroke-width: 2.6; }
.proof-stop .proof-icon { background: var(--stop-tint); color: var(--stop); }
.proof-ok .proof-icon { background: var(--green-tint); color: var(--green-ink); }
.proof-body { display: grid; gap: 6px; min-width: 0; }
.proof-app { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.proof-msg { display: grid; gap: 2px; font-size: .92rem; line-height: 1.7; color: var(--ink-muted); overflow-wrap: anywhere; }
.proof-msg span:first-child { color: var(--ink); font-weight: 700; }
@keyframes rise { from { opacity: .35; transform: translateY(18px); } }
@media (max-width: 720px) {
  .hero { padding: 40px 0 48px; }
  .hero::before { top: 18px; width: 210px; height: 18px; inset-inline-end: -90px; }
  .hero::after { top: 50px; width: 160px; height: 18px; inset-inline-end: -90px; }
}

/* ---------- sections */
.section { padding: 64px 0; }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h2 { color: #fff; }

.catalog-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 8px; }
.catalog-head h2 { margin: 0; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill); padding: 0 16px; background: #fff;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29,46,85,.12); }
.search svg { color: var(--ink-muted); }
.search input { border: 0; outline: 0; background: transparent; font: 400 1rem/1.4 var(--font); color: var(--ink); min-height: 48px; width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.chip {
  font: 700 .95rem/1 var(--font); color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  padding: 10px 16px; min-height: 44px; cursor: pointer;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.chip:hover { border-color: var(--navy); }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }

.group { margin-top: 36px; }
.group[hidden] { display: none; }
.group-h { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; margin-bottom: 14px; }
.swatch { width: 14px; height: 14px; border-radius: 4px; transform: rotate(45deg); }
.swatch-sales { background: var(--cat-sales); }
.swatch-purchase { background: var(--green-ink); }
.swatch-inventory { background: var(--cat-inventory); }
.swatch-accounting { background: var(--cat-accounting); }
.swatch-integration { background: var(--navy); }
.count { font-size: .85rem; font-weight: 700; color: var(--ink-muted); background: var(--surface-soft); border-radius: var(--radius-pill); padding: 0 10px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
.card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: #fff; color: inherit; text-decoration: none;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.card:hover { border-color: var(--navy); box-shadow: var(--shadow); transform: translateY(-2px); }
.card[hidden] { display: none; }
.card h4 { font-size: 1.18rem; font-weight: 800; margin: 0; }
.card p { color: var(--ink-muted); font-size: .98rem; margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--surface-soft); color: var(--navy); transition: transform .25s var(--ease-out), background-color .25s var(--ease-out), color .25s var(--ease-out); }
.card:hover .go { background: var(--navy); color: #fff; transform: translateX(-4px); }
.offer-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.empty { margin-top: 24px; font-weight: 600; }

.badge { display: inline-block; font: 700 .8rem/1.6 var(--font); border-radius: var(--radius-sm); padding: 1px 10px; color: #fff; }
.badge-sales { background: var(--cat-sales); }
.badge-purchase { background: var(--green-ink); }
.badge-inventory { background: var(--cat-inventory); color: var(--on-cat-inventory); }
.badge-accounting { background: var(--cat-accounting); }
.badge-integration { background: var(--navy); }

.tag { font: 700 .85rem/1.6 var(--font); border-radius: var(--radius-pill); padding: 2px 12px; }
.tag-free { background: var(--green-tint); color: var(--green-ink); }
.price { font-weight: 800; color: var(--navy); font-size: .98rem; }

/* ---------- dark infographic */
.section-dark { background: var(--navy-deep); color: #fff; }
.section-dark h2 { color: #fff; }
.flow { list-style: none; counter-reset: s; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; position: relative; }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .flow::before { content: ""; position: absolute; top: 44px; inset-inline: 12%; height: 2px; background: var(--navy-line); }
}
.flow li { counter-increment: s; position: relative; background: var(--navy-card); border-radius: var(--radius-md); padding: 22px 20px; display: grid; gap: 6px; align-content: start; }
.flow li::before {
  content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px;
  border-radius: 50%; background: var(--mint); color: var(--navy); font-weight: 900; font-size: 1.2rem; position: relative;
}
.flow b { font-size: 1.15rem; font-weight: 800; }
.flow span { color: var(--on-dark-muted); font-size: .96rem; line-height: 1.7; }
.section-dark .abroad { color: var(--on-dark-muted); }
.abroad { margin-top: 24px; color: var(--ink-muted); font-size: .95rem; }

.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; font-size: 1.3rem; color: var(--green-ink); }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--ink-muted); }

.custom-in { display: grid; gap: 24px; align-items: start; }
@media (min-width: 900px) { .custom-in { grid-template-columns: 1fr 1.25fr; gap: 56px; } }
.custom-copy p { color: #d6deea; font-size: 1.1rem; }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius-md); padding: 24px; box-shadow: 0 24px 48px -24px rgba(0,0,0,.45); }

/* ---------- forms */
.form-grid { display: grid; gap: 14px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-weight: 700; font-size: .92rem; }
.req { color: var(--cat-sales); }
.opt { color: var(--ink-muted); font-weight: 400; font-size: .85rem; }
.field input, .field select, .field textarea {
  font: 400 1rem/1.5 var(--font); color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 48px; width: 100%;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29,46,85,.15); }
.field [aria-invalid="true"] { border-color: var(--stop); }
.form-error { color: var(--stop); font-weight: 700; margin: 12px 0 0; }
.wa-form .btn { margin-top: 16px; }
.form-hint { color: var(--ink-muted); font-size: .9rem; margin: 10px 0 0; }
.form-done { margin-top: 16px; padding: 16px; border-radius: var(--radius-sm); background: var(--green-tint); color: var(--ink); }
.form-done p { margin: 0 0 4px; }
.done-title { font-weight: 800; color: var(--green-ink); }
.done-small { font-size: .9rem; }

/* ---------- app page */
.app-hero { position: relative; overflow: hidden; padding: 20px 0 36px; background: var(--surface-soft); }
.app-hero::before, .app-hero::after {
  content: ""; position: absolute; inset-inline-end: -80px; height: 22px;
  border-radius: var(--radius-pill); transform: rotate(-38deg); pointer-events: none;
}
.app-hero::before { top: 26px; width: 260px; background: var(--navy); }
.app-hero::after { top: 66px; width: 190px; background: var(--green); }
.app-hero .wrap { position: relative; }
.crumbs { font-size: .92rem; color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); }
.app-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin: 14px 0 8px; max-width: 22ch; }
.app-hero .lead { max-width: 60ch; }
.app-hero-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.meta li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 12px; font-size: .9rem; font-weight: 600; }
.meta li span { color: var(--ink-muted); font-weight: 400; margin-inline-end: 4px; }
@media (max-width: 720px) {
  .app-hero::before { width: 180px; height: 16px; top: 14px; }
  .app-hero::after { width: 130px; height: 16px; top: 42px; }
}

.app-layout { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 64px; grid-template-areas: "side" "main"; }
.app-main { grid-area: main; min-width: 0; }
.app-side { grid-area: side; display: grid; gap: 14px; align-content: start; }
@media (min-width: 960px) {
  .app-layout { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "main side"; gap: 48px; }
}

.offer { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; background: #fff; }
.offer-paid { border: 2px solid var(--navy); box-shadow: var(--shadow); }
.offer-kicker { font-weight: 800; font-size: 1.05rem; margin-bottom: 10px; }
.offer-free .offer-kicker { color: var(--green-ink); }
.offer-price { font-size: 2.1rem; font-weight: 900; color: var(--navy); margin: 0 0 12px; line-height: 1.2; }
.offer-note { font-size: .86rem; color: var(--ink-muted); margin: 10px 0 0; text-align: center; }
.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 8px; font-size: .96rem; line-height: 1.6; }
.ticks svg { color: var(--green-ink); margin-top: 3px; stroke-width: 2.6; }
.dl-list { display: grid; gap: 8px; }
.btn-dl {
  justify-content: flex-start; text-align: start; gap: 12px;
  border-radius: var(--radius-sm); background: var(--green-tint); color: var(--green-ink);
  border: 1.5px solid #bfe3d0; padding: 10px 14px;
}
.btn-dl > span { display: grid; }
.btn-dl b { font-weight: 800; }
.btn-dl:hover { border-color: var(--green-ink); }
.btn-dl small { font-weight: 400; color: var(--ink-muted); font-size: .8rem; line-height: 1.5; }
.btn-dl.is-off { background: var(--surface-soft); color: var(--ink-muted); border-style: dashed; border-color: var(--line); cursor: default; }

.block { padding-bottom: 36px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block h2 { font-size: 1.45rem; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.compare { width: 100%; border-collapse: collapse; font-size: .96rem; }
.compare th, .compare td { padding: 12px 14px; text-align: start; vertical-align: middle; }
.compare thead th { background: var(--surface-soft); font-weight: 800; font-size: .92rem; }
.compare thead .col-paid { background: var(--navy); color: #fff; }
.compare tbody th { font-weight: 600; line-height: 1.6; }
.compare tbody tr + tr { border-top: 1px solid var(--line); }
.compare td { width: 92px; text-align: center; }
.compare tbody td:last-child { background: rgba(29,46,85,.04); }
.compare tr.plus th { color: var(--ink); }
.compare .yes, .compare .no { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.compare .yes { background: var(--green-tint); color: var(--green-ink); }
.compare .yes svg { stroke-width: 2.8; width: 18px; height: 18px; }
.compare .no { color: #9aa6ba; }
.compare tfoot td { border-top: 1px solid var(--line); padding: 12px 8px; width: auto; }
.compare tfoot .btn { white-space: nowrap; padding-inline: 12px; }
@media (max-width: 520px) { .compare td { width: 64px; } .compare th, .compare td { padding: 10px 8px; } }

.prose p { margin: 0 0 .6em; }
.prose ul, .prose ol { margin: 0 0 .8em; padding-inline-start: 1.4em; }
.prose li { margin: .15em 0; }
.prose li > ul, .prose li > ol { margin: .2em 0 .3em; }
.prose h4 { font-size: 1.05rem; margin-top: 1em; }
pre.msg { background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; white-space: pre-wrap; font: 400 .9rem/1.7 var(--font); }
.install { padding-inline-start: 1.4em; }
.install li { margin: .3em 0; }
.note { color: var(--ink-muted); font-size: .95rem; }

.manual summary { cursor: pointer; font-weight: 700; color: var(--green-ink); min-height: 44px; display: flex; align-items: center; }
.manual[open] summary { margin-bottom: 12px; }
.code-wrap { position: relative; margin-top: 12px; }
.code { background: var(--navy-deep); color: #e8eef7; border-radius: var(--radius-sm); padding: 48px 16px 16px; overflow: auto; max-height: 460px; font: 400 .85rem/1.6 var(--mono); text-align: left; margin: 0; }
.code code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.btn-copy { position: absolute; top: 8px; left: 8px; font: 700 .85rem/1 var(--font); background: var(--mint); color: var(--navy); border: 0; border-radius: var(--radius-pill); padding: 8px 14px; min-height: 32px; cursor: pointer; }

.order { scroll-margin-top: 84px; }
.order-price { font-size: 1.6rem; font-weight: 900; color: var(--navy); }
.order .wa-form { background: var(--surface-soft); border-radius: var(--radius-md); padding: 20px; }

/* ---------- footer */
.footer { background: var(--navy-deep); color: #d6deea; padding: 44px 0; }
.footer-in { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-logo { width: 132px; }
.footer-tag { font-weight: 700; color: #fff; margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-links a { color: #d6deea; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--mint); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.group-pair { display: grid; gap: 0 14px; }
@media (min-width: 720px) { .group-pair { grid-template-columns: 1fr 1fr; } .group-pair .grid { grid-template-columns: 1fr; } }
.group-pair:not(:has(.group:not([hidden]))) { display: none; }
