/* Sa'rana public site — sarana.live
 *
 * Arabic default, RTL-first. English is a toggle, not a second design.
 * Palette and Cairo come from the app. No tracking, no third-party scripts.
 */

@font-face {
  font-family: 'Cairo';
  src: url('cairo.ttf') format('truetype-variations');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --brand: #3d63f5;
  --brand-dark: #2a4bc9;
  --brand-soft: #e8edfe;
  --hero-navy: #1e3a8a;
  --hero-blue: #2563eb;
  --ink: #121a2c;
  --ink-muted: #5d6778;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #eef2f9;
  --border: #d8dee9;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --high: #b42318;
  --high-bg: #fef3f2;
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1080px;
  --shadow: 0 10px 28px rgba(24, 37, 64, 0.08), 0 2px 6px rgba(24, 37, 64, 0.04);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--brand); }
button { font-family: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; text-align: center; }

html[data-lang='ar'] [data-l='en'] { display: none; }
html[data-lang='en'] [data-l='ar'] { display: none; }

/* ── Header ─────────────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  margin-inline-end: auto;
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(61, 99, 245, 0.28);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a.link {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a.link:hover,
.nav a.link.is-active { color: var(--brand); background: var(--brand-soft); }
.nav-login {
  border: 1px solid var(--border);
  color: var(--ink) !important;
  background: var(--surface);
}
.nav-login:hover {
  border-color: var(--brand);
  color: var(--brand) !important;
  background: var(--brand-soft);
}

.langbtn,
.nav-toggle {
  font-weight: 800;
  font-size: 13.5px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.langbtn:hover { border-color: var(--brand); color: var(--brand); }
.nav-toggle { display: none; min-width: 44px; }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 16.5px; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(61, 99, 245, 0.28);
}
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nav-store {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13.5px;
  box-shadow: none;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 16px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.28);
}
.store-btn:hover { background: #000; color: #fff; }
.store-btn small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  line-height: 1.1;
}
.store-btn strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}
.store-btn svg { flex-shrink: 0; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  overflow: hidden;
  padding: 64px 0 48px;
  background:
    radial-gradient(800px 380px at 90% -10%, color-mix(in srgb, var(--hero-blue) 22%, transparent), transparent),
    linear-gradient(180deg, #e8eefc 0%, #f7f9fd 55%, var(--bg) 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-weight: 800;
  font-size: 15px;
  color: var(--brand-dark);
}
.brand-mark img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.7px;
  max-width: 12ch;
}
.lede {
  margin: 0 0 22px;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--ink-muted);
  font-weight: 600;
  max-width: 28ch;
  line-height: 1.55;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.hero-points li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-muted);
}
.hero-points li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 900;
  margin-inline-end: 6px;
}
.hero-phone {
  display: grid;
  place-items: center;
}
.hero-phone img {
  width: min(300px, 100%);
  height: auto;
}

/* ── Sections ───────────────────────────────────────────────────────── */
section { padding: 72px 0; }
section h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}
.lead {
  margin: 0 0 8px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
}
.lead.muted { color: var(--ink-muted); font-weight: 600; margin-bottom: 32px; }
section p.sub { color: var(--ink-muted); margin: 0 0 28px; font-weight: 600; }
.band { background: var(--surface); border-block: 1px solid var(--border); }
#how h2, #example h2, #more h2, #how .sub, #example .sub, #more .sub {
  text-align: center;
}
#example .sub, #more .sub { max-width: 40ch; margin-inline: auto; margin-bottom: 28px; }

.diff {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 8px;
}
.diff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 18px 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.diff-card strong {
  display: block;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 6px 0 2px;
}
.diff-shop { display: block; color: var(--ink-muted); font-weight: 700; font-size: 14px; }
.diff-unit { display: block; color: var(--ink-muted); font-size: 13px; margin-bottom: 12px; }
.diff-same {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
html[data-lang='en'] .diff-same { writing-mode: vertical-lr; transform: none; }

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 800;
}
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-high { background: var(--high-bg); color: var(--high); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 36px;
}
.step {
  text-align: center;
  padding: 8px 12px;
}
.ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.ico svg { width: 26px; height: 26px; }
.step-n {
  margin: 0 0 4px;
  color: var(--brand);
  font-weight: 900;
  font-size: 13px;
}
.step h3 { margin: 0 0 6px; font-size: 22px; font-weight: 900; }
.step p { margin: 0 auto; color: var(--ink-muted); font-size: 15.5px; max-width: 22ch; font-weight: 600; }

.demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  max-width: 640px;
  margin-inline: auto;
  text-align: start;
}
.demo-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.demo-kicker {
  margin: 0 0 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-muted);
}
.demo-head h3 { margin: 0; font-size: 22px; font-weight: 900; }
.demo-ref { text-align: end; }
.demo-ref-price { margin: 0; font-size: 20px; font-weight: 900; color: var(--hero-navy); }
.demo-rows { display: grid; gap: 12px; }
.demo-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.demo-row.ok { background: var(--ok-bg); border-color: #bbf7d0; }
.demo-row.high { background: var(--high-bg); border-color: #fecaca; }
.demo-row strong { display: block; font-size: 16px; margin-bottom: 6px; }
.demo-price { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.6px; }

.also {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.also article {
  background: var(--bg);
  border-radius: 18px;
  padding: 22px;
}
.also h3 { margin: 0 0 6px; font-size: 20px; font-weight: 900; }
.also p { margin: 0; color: var(--ink-muted); font-weight: 600; }

.download {
  background: var(--hero-navy);
  color: #fff;
  padding: 48px 0;
}
.download h2 { margin: 0 0 6px; color: #fff; }
.download p { margin: 0; color: #bfdbfe; font-weight: 600; }
.download-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.disclaimer {
  margin: 0 auto;
  padding: 22px 24px 8px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ── Legal pages ────────────────────────────────────────────────────── */
.legal { background: var(--surface); padding: 40px 0 72px; }
.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  max-width: 960px;
  margin: 0 auto;
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  align-self: start;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}
.toc a {
  display: block;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 6px 8px;
  border-radius: 8px;
}
.toc a:hover { color: var(--brand); background: var(--brand-soft); }
.legal h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 900; margin: 0 0 6px; }
.legal .meta { color: var(--ink-muted); font-size: 14.5px; margin: 0 0 28px; }
.legal h2 {
  font-size: 19px;
  font-weight: 800;
  margin: 32px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; }
.legal p, .legal li { font-size: 15.5px; }
.legal ul { padding-inline-start: 22px; }
.legal li { margin-bottom: 8px; }
.legal a.mail { font-weight: 800; }

/* ── Footer ─────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--hero-navy);
  color: #dbeafe;
  padding: 40px 0 28px;
}
footer a { color: #fff; text-decoration: none; font-weight: 700; }
footer a:hover { opacity: 0.85; }
.footgrid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.footgrid h4 { margin: 0 0 10px; color: #fff; font-size: 15px; }
.footgrid p, .footgrid a { display: block; margin: 0 0 8px; font-size: 14px; color: #bfdbfe; }
.footgrid .brand { color: #fff; margin-bottom: 10px; }
.footcopy {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 16px;
  font-size: 13px;
  color: #93c5fd;
}

@media (max-width: 900px) {
  .hero-grid, .steps, .also, .legal-layout, .footgrid, .download-inner, .diff {
    grid-template-columns: 1fr;
  }
  .hero-grid { gap: 28px; }
  .hero h1 { max-width: none; }
  .lede { max-width: 36ch; }
  .hero-phone img { width: min(260px, 72vw); }
  .diff-same {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .demo { padding: 20px; }
  .demo-head, .demo-row { flex-direction: column; align-items: flex-start; }
  .demo-ref { text-align: start; }
  .toc { position: static; }
  .nav-store { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute;
    inset-inline: 12px;
    top: calc(var(--header-h) + 8px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow);
  }
  .nav-links.is-open { display: flex; }
}

@media (max-width: 640px) {
  .hero { padding: 36px 0 24px; }
  section { padding: 52px 0; }
  .cta-row .btn { width: 100%; }
}
