/* Resid8 public site: Cedar Calm tokens from app/lib/theme/themes.dart */
:root {
  --bg: #F4F6F3; --surface: #FFFFFF; --soft: #E6F2EC; --primary: #0F4C3A; --on-primary: #FFFFFF;
  --accent: #5E9C80; --ink: #13251E; --muted: #5B6B64; --line: #E3E8E4;
  --success: #0E8A5F; --warning: #B7791F; --danger: #C0392B;
  --r: 16px; --shadow: 0 1px 2px rgb(19 37 30 / .06), 0 18px 40px -18px rgb(19 37 30 / .22);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", "Geeza Pro", Tahoma, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1311; --surface: #121C19; --soft: #17302A; --primary: #7FD1AE; --on-primary: #08231A;
    --accent: #5E9C80; --ink: #EAF2EE; --muted: #9AABA3; --line: #22312C;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 24px 50px -24px rgb(0 0 0 / .8);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); }
[lang="ar"] body { font-family: var(--font-ar); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; z-index: 9; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; text-decoration: none; direction: ltr; }
.brand img { width: 34px; height: 34px; }
.top nav { margin-inline-start: auto; display: flex; align-items: center; gap: 18px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover { color: var(--ink); }
.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.langs a { padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.langs a[aria-current] { background: var(--soft); color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .top nav .nav-link { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--ghost { border-color: var(--line); background: var(--surface); }
.btn--ghost:hover { border-color: var(--accent); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* hero */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -200px -200px auto auto; width: 760px; height: 640px; z-index: -1;
  background: radial-gradient(45% 45% at 55% 45%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%); filter: blur(30px); }
[dir="rtl"] .hero::before { inset: -200px auto auto -200px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }
h1 { margin: 0; font-size: clamp(40px, 6vw, 66px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; }
[lang="ar"] h1 { letter-spacing: 0; line-height: 1.2; }
.lead { margin: 20px 0 28px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 56ch; }
.note { margin: 18px 0 0; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in oklab, var(--success) 20%, transparent); }
@media (max-width: 900px) { .hero { padding-top: 48px; } .hero .wrap { grid-template-columns: 1fr; } }

/* phone mockup (sample data, drawn in HTML) */
.stage { position: relative; display: flex; justify-content: center; padding: 60px 0; }
.phone { width: 300px; border-radius: 40px; padding: 10px; background: #0E1A16; box-shadow: var(--shadow); }
.screen { border-radius: 31px; overflow: hidden; background: #F4F6F3; color: #13251E; font-size: 13px; line-height: 1.4; }
.screen .bar { display: flex; justify-content: space-between; padding: 12px 20px 6px; font-size: 11px; font-weight: 700; direction: ltr; }
.screen .pad { padding: 8px 16px 18px; display: grid; gap: 10px; }
.screen h4 { margin: 0; font-size: 12px; color: #5B6B64; font-weight: 600; }
.screen .hi { font-size: 18px; font-weight: 800; }
.card { background: #fff; border-radius: 16px; padding: 14px; border: 1px solid #E3E8E4; }
.card--due { background: #0F4C3A; color: #fff; border: 0; }
.card--due small { color: #BFE3D2; }
.amt { font-size: 26px; font-weight: 800; letter-spacing: -.02em; unicode-bidi: isolate; }
.amt2 { font-size: 12px; color: #BFE3D2; unicode-bidi: isolate; }
.pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
.pays span { background: rgb(255 255 255 / .14); border-radius: 10px; padding: 7px 0; text-align: center; font-weight: 700; font-size: 12px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #EEF1EE; }
.row:first-of-type { border-top: 0; }
.row b { font-weight: 700; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.row em { font-style: normal; color: #5B6B64; font-size: 11px; display: block; }
.meter { height: 8px; border-radius: 99px; background: #E6F2EC; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; width: 82%; background: #0E8A5F; border-radius: 99px; }
[dir="rtl"] .meter i { margin-inline-start: auto; }
.float { position: absolute; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.float .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--success); font-weight: 800; }
.float--a { inset-inline-start: 0; top: 0; }
.float--b { inset-inline-end: 0; bottom: 0; }
@media (max-width: 520px) { .float { display: none; } .stage { padding: 24px 0 0; } .top .btn--sm { display: none; } }

/* sections */
section { padding: 64px 0; }
.head { max-width: 680px; margin-bottom: 36px; }
h2 { margin: 0; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
[lang="ar"] h2 { letter-spacing: 0; line-height: 1.35; }
.sub { margin: 14px 0 0; color: var(--muted); font-size: 18px; }
.replace { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.replace span { padding: 8px 14px; border-radius: 999px; border: 1px dashed var(--line); color: var(--muted); text-decoration: line-through; text-decoration-color: var(--danger); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--soft); color: var(--primary); font-weight: 800; margin-bottom: 14px; }
.steps h3, .feat h3 { margin: 0 0 6px; font-size: 19px; }
.steps p, .feat p { margin: 0; color: var(--muted); font-size: 16px; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feat article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.ico { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; margin-bottom: 16px; color: var(--primary); }
.ico svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .steps, .feat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps, .feat { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split article { border-radius: 20px; padding: 30px; border: 1px solid var(--line); background: var(--surface); }
.split article.dark { background: var(--primary); color: var(--on-primary); border: 0; }
.split article.dark .ticks li { color: color-mix(in oklab, var(--on-primary) 80%, transparent); }
.split article.dark .ticks li::before { background: var(--on-primary); }
.split h3 { margin: 0 0 16px; font-size: 22px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-inline-start: 24px; color: var(--muted); }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust div { padding: 20px 0; border-top: 2px solid var(--primary); }
.trust b { display: block; font-size: 17px; margin-bottom: 6px; }
.trust span { color: var(--muted); font-size: 15px; }
@media (max-width: 900px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

.band { border-radius: 24px; padding: 44px; background: var(--primary); color: var(--on-primary); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.band p { margin: 10px 0 0; opacity: .85; max-width: 56ch; }
.band .btn--primary { background: var(--on-primary); color: var(--primary); }
.band .btn--ghost { background: transparent; color: var(--on-primary); border-color: color-mix(in oklab, var(--on-primary) 40%, transparent); }

footer { padding: 40px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); margin-top: 32px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
