/* ─────────────────────────────────────────────────────────────────────────
   Mithaq ميثاق — marketing site + one-sheet styles
   Ink & Coral system (docs/brand.md): bone canvas, deep-ink chrome, coral
   primary, Sora/Inter + IBM Plex Sans Arabic. Logical properties only, so
   one stylesheet serves RTL (index.html) and LTR (en.html).
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --canvas: #f6f3ef;
  --surface: #ffffff;
  --surface-2: #efebe4;
  --surface-3: #e7e1d7;
  --ink-chrome: #16181d;
  --ink: #201a15;
  --muted: #6b6259;
  --faint: #9c938a;
  --border: #e4ded6;
  --border-strong: #cfc6b9;
  --primary: #e4572e;
  --primary-hover: #c7441f;
  --primary-soft: #fcedf0;
  --on-primary: #ffffff;
  --success: #2f7d5b;
  --success-bg: #e5f2ec;
  --sidebar-ink: #c7ccd4;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(32, 26, 21, 0.05);
  --shadow: 0 1px 2px rgba(32, 26, 21, 0.05), 0 4px 16px rgba(32, 26, 21, 0.06);
  --shadow-lg: 0 16px 40px rgba(32, 26, 21, 0.16);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h1, h2 { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.01em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3,
html[lang="ar"] .brand-name { font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif; letter-spacing: 0; }
h1 { font-size: clamp(30px, 4.4vw, 52px); }
h2 { font-size: clamp(22px, 2.6vw, 32px); }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
a { color: var(--primary-hover); }
strong { font-weight: 600; }

.wrap { max-width: 1100px; margin-inline: auto; padding-inline: 24px; }

/* ── Components ─────────────────────────────────────────────────────── */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand .brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.brand .brand-mark svg { width: 18px; height: 18px; }
.brand .brand-name { font-weight: 700; font-size: 19px; font-family: "Sora", "Inter", sans-serif; }
.brand .brand-sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); line-height: 1.3; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 20px;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary-hover); }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: var(--r-lg); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: var(--r-sm); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
}
.chip.coral { background: var(--primary-soft); border-color: transparent; color: var(--primary-hover); }
.chip.ok { background: var(--success-bg); border-color: transparent; color: var(--success); }

/* ── Site header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.site-nav { display: flex; gap: 18px; margin-inline-start: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.site-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary-hover); }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero { padding: 64px 0 40px; }
.hero .grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-hover);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}
.hero .lead { font-size: 18px; color: var(--muted); max-width: 52ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.hero-note { font-size: 13px; color: var(--faint); }

/* ── Match card (hero proof visual) ─────────────────────────────────── */
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  font-size: 14px;
}
.mc-head { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.mc-entity { flex: 1; min-width: 0; }
.mc-kind { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; margin-bottom: 3px; }
.mc-title { font-weight: 600; line-height: 1.35; }
.mc-score { text-align: center; flex-shrink: 0; }
.mc-score b { display: block; font-size: 26px; line-height: 1; font-weight: 700; color: var(--primary-hover); }
.mc-score span { font-size: 10.5px; color: var(--faint); }
.mc-arrow { color: var(--primary); font-weight: 700; flex-shrink: 0; }
.mc-body { padding: 12px 0 4px; }
.mc-reason { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; color: var(--ink); }
.mc-reason .mark { color: var(--success); font-weight: 700; flex-shrink: 0; }
.mc-reason small { color: var(--muted); font-size: 12px; }
.mc-foot { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border-strong); display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--primary-hover); font-weight: 600; font-size: 13px; }
.mc-arrow-rtl { transform: scaleX(-1); }

/* ── Section shell ──────────────────────────────────────────────────── */
section { padding: 56px 0; }
.sec-head { max-width: 640px; margin-bottom: 34px; }
.sec-head h2 span { color: var(--primary-hover); }
.sec-kicker {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary-hover);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
html[lang="ar"] .sec-kicker { letter-spacing: 0; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  position: relative;
}
.step .num {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--on-primary);
  background: var(--primary);
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
html[lang="ar"] .step .num { font-family: "IBM Plex Sans Arabic", sans-serif; }
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: var(--muted); margin: 0; }
.step .ic { color: var(--primary-hover); margin-bottom: 10px; display: block; }

/* explain */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.tier-card { background: var(--ink-chrome); color: var(--sidebar-ink); border-radius: var(--r-lg); padding: 22px; font-size: 13.5px; box-shadow: var(--shadow-lg); }
.tier-card h3 { color: #fff; font-size: 15px; margin-bottom: 4px; }
.tier-card .tc-sub { color: #7d828c; font-size: 12px; margin-bottom: 14px; }
.tier-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(199, 204, 212, 0.14); }
.tier-row:first-of-type { border-top: none; }
.tier-row .k { color: var(--sidebar-ink); display: flex; align-items: center; gap: 8px; }
.tier-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.tier-row .v.ok { color: #7ec9a4; }
.tier-row .v.dim { color: #7d828c; font-weight: 500; }
.check { color: #7ec9a4; font-weight: 700; }
.screen {
  display: block;
  width: 100%;
  max-width: 640px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.split .screen { margin-inline: auto; }
.dot-list { list-style: none; padding: 0; margin: 0; }
.dot-list li { padding-inline-start: 22px; position: relative; margin-bottom: 10px; font-size: 15px; }
.dot-list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.62em; width: 8px; height: 8px; border-radius: 2px; background: var(--primary); }

/* pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; }
.price-card.feature { border-color: var(--primary); box-shadow: var(--shadow); }
.price-card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.price-card .amount { font-family: "Sora", "Inter", sans-serif; font-size: 26px; font-weight: 700; color: var(--ink); margin: 8px 0 2px; }
html[lang="ar"] .price-card .amount { font-family: "IBM Plex Sans Arabic", sans-serif; }
.price-card .per { font-size: 12.5px; color: var(--faint); margin-bottom: 12px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; }
.price-card li { font-size: 13.5px; color: var(--muted); padding: 4px 0; padding-inline-start: 18px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--primary-hover); font-weight: 700; }
.price-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; }

/* audience band */
.band { background: var(--ink-chrome); color: var(--sidebar-ink); }
.band h2 { color: #fff; }
.band .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.band .col { padding: 20px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(199, 204, 212, 0.14); border-radius: var(--r); }
.band .col h3 { color: #fff; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.band .col p { color: #a7adb8; font-size: 13.5px; margin: 0; }

/* final CTA */
.cta-final { text-align: center; padding: 70px 0; }
.cta-final h2 { max-width: 22ch; margin-inline: auto; }
.cta-final .sub { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* contact / demo booking */
.demo-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.demo-form .field { margin-bottom: 12px; }
.demo-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--ink); }
.demo-form input, .demo-form textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: var(--r-sm); padding: 9px 11px;
}
.demo-form input:focus, .demo-form textarea:focus { outline: none; border-color: var(--primary); }
.demo-form textarea { resize: vertical; min-height: 64px; }
.demo-msg { margin: 10px 0 0; font-size: 13px; min-height: 1em; }
.demo-msg.ok { color: var(--success); }
.demo-msg.err { color: var(--danger); }
.contact-links { list-style: none; padding: 0; margin: 0; }
.contact-links li { padding: 10px 0; border-bottom: 1px dashed var(--border-strong); font-size: 15px; }
.contact-links li:last-child { border-bottom: none; }
.contact-links .k { color: var(--faint); font-size: 12px; font-weight: 700; display: block; }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0 40px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.site-footer .foot-right { margin-inline-start: auto; display: flex; gap: 16px; align-items: center; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ── Responsive: phones → tablets → laptops → desktops ──────────────── */
img { max-width: 100%; height: auto; }
html { scroll-padding-top: 76px; }

@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .band .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero .grid, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .site-nav { display: none; }
  .price-grid { grid-template-columns: 1fr 1fr; }
  section { padding: 46px 0; }
  .cta-final { padding: 56px 0; }
  .price-card { min-height: auto; }
}

@media (max-width: 620px) {
  .steps, .band .grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  section { padding: 38px 0; }
  .wrap { padding-inline: 18px; }
  .site-header .wrap { min-height: 58px; gap: 10px; }
  .hero { padding: 32px 0 30px; }
  .hero .lead { font-size: 16.5px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; min-height: 46px; }
  .match-card { padding: 16px; }
  .cta-final { padding: 44px 0; }
  .site-footer { padding: 24px 0 32px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer .foot-right { margin-inline-start: 0; }
  .os { padding: 22px 16px; }
}

@media (max-width: 480px) {
  .brand .brand-sub { display: none; }
  h1 { font-size: 27px; }
  .eyebrow { font-size: 12.5px; }
  .mc-head { gap: 10px; }
  .mc-score b { font-size: 22px; }
  .price-card { padding: 18px; }
  .band .col { padding: 16px; }
}

/* ═══════════════ One-sheet (print) ═══════════════ */
.os { max-width: 820px; margin: 0 auto; padding: 32px 24px; }
.os-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--ink-chrome); padding-bottom: 16px; }
.os-head .brand-name { font-size: 24px; }
.os-head .tag { margin-inline-start: auto; font-size: 13px; font-weight: 600; color: var(--primary-hover); max-width: 30ch; text-align: end; }
.os h1 { font-size: 30px; }
.os .problem { font-size: 16.5px; color: var(--muted); }
.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.os h2 { font-size: 19px; border-inline-start: 3px solid var(--primary); padding-inline-start: 10px; margin: 26px 0 12px; }
.os .steps { grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.os .step { padding: 12px; }
.os .step .num { width: 22px; height: 22px; font-size: 11px; }
.os .step h3 { font-size: 13px; }
.os .step p { font-size: 11.5px; }
.os .price-grid { gap: 10px; margin-top: 8px; }
.os .price-card { padding: 14px; }
.os .price-card .amount { font-size: 21px; }
.os .price-card li { font-size: 11.5px; }
.os table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.os th, .os td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.6; }
.os th { background: var(--surface-2); font-weight: 600; }
.os-foot { margin-top: 26px; border-top: 2px solid var(--ink-chrome); padding-top: 14px; display: flex; align-items: center; font-size: 12.5px; color: var(--muted); }
.os-foot .btn { margin-inline-start: auto; }

@media print {
  body { background: #fff; }
  .os { max-width: none; padding: 0; }
  .no-print { display: none; }
  section, .os { break-inside: auto; }
  .os .step, .os .price-card { break-inside: avoid; }
  @page { size: A4; margin: 14mm; }

  /* Compact the one-sheet so it fits a single A4 page. */
  .os h1 { font-size: 24px; margin-top: 12px !important; margin-bottom: 8px; }
  .os .problem { font-size: 14.5px; margin-bottom: 6px; }
  .os h2 { font-size: 16px; margin: 14px 0 8px; }
  .os .steps { margin-top: 4px; }
  .os .step { padding: 9px; }
  .os .step .num { width: 19px; height: 19px; font-size: 10px; margin-bottom: 6px; }
  .os .step h3 { font-size: 12.5px; }
  .os .step p { font-size: 10.5px; line-height: 1.45; }
  .os table { font-size: 11px; margin-top: 4px; }
  .os th, .os td { padding: 4px 8px; }
  .os .price-card { padding: 10px; }
  .os .price-card .amount { font-size: 18px; margin: 4px 0 0; }
  .os .price-card .per { font-size: 10.5px; margin-bottom: 6px; }
  .os .price-card li { font-size: 10.5px; padding: 2px 0; }
  .os-foot { margin-top: 14px; padding-top: 9px; }
}
