/* Colours from lib/theme/LedgerTheme.dart */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --sunken: #e6e9f2;
  --border: #e3e6ef;
  --text: #141a2e;
  --text2: #3b4256;
  --muted: #5b6275;
  --accent: #26418f;
  --on-accent: #ffffff;
  --accent-soft: #e8eaf6;
  --inbound: #0b6b4f;
  --inbound-soft: #ddf3ea;
  --hero: #f6f7fb;
  --hero2: #e8eaf6;
  --hero-text: #141a2e;
  --hero-sub: #3b4256;
  --header: #f6f7fb;
  --header-line: #e3e6ef;
  --ctl-bg: #ffffff;
  --ctl-line: #d5dae8;
  --ctl-text: #26418f;
  --code-bg: #e6e9f2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10142a;
    --surface: #181d36;
    --sunken: #0c1022;
    --border: #2a3052;
    --text: #e8eaf6;
    --text2: #c3c8db;
    --muted: #9aa1b9;
    --accent: #8fa8ff;
    --on-accent: #0c1022;
    --accent-soft: #232b52;
    --inbound: #5fd3a8;
    --inbound-soft: #123a30;
    --hero: #10142a;
    --hero2: #1e264e;
    --hero-text: #e8eaf6;
    --hero-sub: #c3c8db;
    --header: #10142a;
    --header-line: #2a3052;
    --ctl-bg: #181d36;
    --ctl-line: #2f365a;
    --ctl-text: #8fa8ff;
    --code-bg: rgba(255,255,255,.08);
  }
}
:root[data-theme="dark"] {
    --bg: #10142a;
    --surface: #181d36;
    --sunken: #0c1022;
    --border: #2a3052;
    --text: #e8eaf6;
    --text2: #c3c8db;
    --muted: #9aa1b9;
    --accent: #8fa8ff;
    --on-accent: #0c1022;
    --accent-soft: #232b52;
    --inbound: #5fd3a8;
    --inbound-soft: #123a30;
    --hero: #10142a;
    --hero2: #1e264e;
    --hero-text: #e8eaf6;
    --hero-sub: #c3c8db;
    --header: #10142a;
    --header-line: #2a3052;
    --ctl-bg: #181d36;
    --ctl-line: #2f365a;
    --ctl-text: #8fa8ff;
    --code-bg: rgba(255,255,255,.08);
  }
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, "Noto Sans Arabic", system-ui, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.display { font-family: Teko, "Noto Sans Arabic", sans-serif; font-weight: 500; line-height: 1; letter-spacing: .01em; }

/* Header */
header.top { background: var(--header); color: var(--hero-text); border-bottom: 1px solid var(--header-line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { color: var(--accent); text-decoration: none; font-size: 40px; padding-top: 6px; }
nav.top > a { color: var(--text2); text-decoration: none; margin-inline-start: 20px; font-size: 15px; }
nav.top > a:hover { color: var(--accent); }
nav.top { display: flex; align-items: center; }
.theme-btn {
  margin-inline-start: 10px; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--ctl-line);
  background: var(--ctl-bg); color: var(--ctl-text); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-btn:hover { background: var(--accent-soft); }
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-btn .moon { display: none; }

/* Language menu */
.lang { position: relative; margin-inline-start: 18px; }
.lang summary {
  list-style: none; cursor: pointer; height: 38px; min-width: 46px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--ctl-line); background: var(--ctl-bg); display: grid; place-items: center;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--accent-soft); }
.lang summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 10; min-width: 180px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(8, 12, 30, .18);
}
.lang-menu a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-size: 15px;
}
.lang-menu a:hover { background: var(--accent-soft); }
.lang-menu a[aria-current] { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.flag { width: 24px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: block; }
.code-badge {
  width: 24px; text-align: center; font: 600 11px/1 Inter, sans-serif; letter-spacing: .04em; color: var(--ctl-text);
}

/* Arabic: Teko has no Arabic letters, so headings use Noto Sans Arabic */
:lang(ar) body, body:lang(ar) { font-family: "Noto Sans Arabic", Inter, system-ui, sans-serif; }
:lang(ar) .display:not(.brand) { font-family: "Noto Sans Arabic", sans-serif; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
:lang(ar) .hero h1 { font-size: clamp(44px, 7vw, 80px); }
:lang(ar) h2 { font-size: clamp(32px, 4.5vw, 46px); }
:lang(ar) h3 { font-size: 22px; margin-bottom: 8px; }
:lang(ar) .kicker { letter-spacing: 0; font-size: 14px; }
:root[data-theme="dark"] .theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .moon { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(160deg, var(--hero) 0%, var(--hero2) 100%);
  color: var(--hero-text);
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 48px; }
.hero h1 { font-size: clamp(56px, 9vw, 104px); margin: 0 0 16px; font-weight: 600; text-transform: uppercase; }
.hero p.lead { font-size: 19px; color: var(--hero-sub); max-width: 32em; margin: 0 0 28px; }
.badge img { height: 64px; width: auto; }
.code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  display: inline-block; margin-top: 28px; padding: 8px 14px; border-radius: 10px;
  background: var(--code-bg); color: var(--hero-sub); font-size: 15px;
}
.code s { opacity: .7; }
.hero .phone { align-self: end; justify-self: center; width: min(320px, 80%); margin-bottom: -60px; }

.phone {
  border-radius: 36px; padding: 10px; background: #0c1024;
  box-shadow: 0 30px 60px rgba(8, 12, 30, .35);
}
.phone img { border-radius: 28px; width: 100%; height: auto; aspect-ratio: 540 / 1170; }

/* Sections */
section { padding: 96px 0; }
section.first { padding-top: 120px; }
.kicker { color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0 0 6px; }
h2 { font-size: clamp(40px, 6vw, 60px); margin: 0 0 16px; font-weight: 600; text-transform: uppercase; }
h3 { font-size: 30px; margin: 0 0 6px; font-weight: 500; text-transform: uppercase; }
.sub { color: var(--muted); font-size: 18px; max-width: 36em; margin: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px 16px; }
.chip b { display: block; font-weight: 600; }
.chip span { color: var(--muted); font-size: 14px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px 24px 0; overflow: hidden; display: flex; flex-direction: column; }
.feature p { color: var(--muted); margin: 0 0 20px; }
.feature .shot { margin-top: auto; border-radius: 18px 18px 0 0; overflow: hidden; border: 1px solid var(--border); border-bottom: 0; }
.feature .shot img { width: 100%; height: auto; aspect-ratio: 540 / 1170; }
.feature .shot.crop { aspect-ratio: 540 / 760; }
.feature .shot.crop img { object-fit: cover; object-position: top; height: 100%; }

.private { background: var(--surface); border-block: 1px solid var(--border); }
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.point { background: var(--bg); border-radius: 18px; padding: 22px; }
.point .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--inbound-soft); color: var(--inbound); margin-bottom: 12px; }
.point p { margin: 0; color: var(--muted); }
.point b { display: block; color: var(--text); margin-bottom: 4px; }

.cta { text-align: center; }
.cta .sub { margin: 0 auto 28px; }
.cta .badge { display: inline-block; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Text pages */
.doc { max-width: 760px; padding-top: 48px; padding-bottom: 80px; }
.doc h1 { font-size: 64px; margin: 0 0 24px; text-transform: uppercase; font-weight: 600; }
.doc h4 { font-size: 18px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--text2); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; }
  .hero .phone { width: min(280px, 75%); }
  .features, .points { grid-template-columns: 1fr; }
  .features { max-width: 440px; margin-inline: auto; }
  nav.top a.hide-sm { display: none; }
  section { padding: 72px 0; }
  section.first { padding-top: 100px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .badge img { height: 56px; }
}
.code bdi { font-family: "JetBrains Mono", ui-monospace, monospace; }
:lang(ar) .code { font-family: "Noto Sans Arabic", sans-serif; }
