/* Daftar landing. Colours from the app (app/lib/ui/theme.dart): teal #0E6B62, amber #E8A33D,
   expense #C0392B, income #1E8E3E. Contrast on --paper: ink 15.9:1, muted 6.8:1, teal 6.0:1;
   on --night: white 12.4:1, --night-muted 8.0:1, amber 5.8:1. One stylesheet for RTL and LTR. */
:root {
  --paper: #F4FAF8;
  --card: #FFFFFF;
  --ink: #10201D;
  --muted: #4A5B57;
  --teal: #0E6B62;
  --teal-hover: #0A564F;
  --mint: #A3F0E4;
  --mint-soft: #DDF3EF;
  --amber: #E8A33D;
  --amber-soft: #F8DDAE;
  --expense: #C0392B;
  --income: #18773A;
  --night: #0A3B36;
  --night-muted: #B9D6D1;
  --rule: #D5E7E3;
  --radius: 20px;
  --row: 52px;
  --wrap: 1180px;
  --lh: 1.8;
  --origin: right;
  --shadow: 0 1px 2px rgb(10 59 54 / .06), 0 12px 32px -12px rgb(10 59 54 / .22);
}
html[dir="ltr"] { --lh: 1.6; --origin: left; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/var(--lh) "Cairo", system-ui, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--teal-hover); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.3; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num, .amt, bdi { font-variant-numeric: tabular-nums lining-nums; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; inset-inline-start: 16px; top: -100px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 700;
}
.skip:focus { top: 12px; color: #fff; }

/* Buttons: the app's FilledButton (radius 16), min 48px tall */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .55em 1.4em; border-radius: 16px;
  font: inherit; font-weight: 700; text-decoration: none; border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-hover); color: #fff; }
.btn-quiet { border-color: var(--teal); color: var(--teal); }
.btn-quiet:hover { background: var(--mint-soft); }
.btn-sm { min-height: 44px; padding: .3em 1.05em; font-size: .9375rem; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgb(244 250 248 / .92); backdrop-filter: saturate(1.4) blur(10px); border-block-end: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.375rem; min-height: 44px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9375rem; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 12px; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--mint-soft); }
.nav .lang { color: var(--teal); }
@media (max-width: 760px) { .nav a.sect { display: none; } }

/* Hero */
.hero { padding-block: 56px 72px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--teal); font-size: .9375rem; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--amber); }
.hero h1 { font-size: clamp(2.05rem, 1.2rem + 3.6vw, 3.6rem); font-weight: 800; margin-block: 14px 18px; letter-spacing: -.01em; }
html[dir="ltr"] .hero h1 { letter-spacing: -.025em; line-height: 1.12; }
.hero h1 em { font-style: normal; color: var(--teal); }
.lead { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); color: var(--muted); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-block-start: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .9375rem; font-weight: 600; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* Signature: a ruled ledger page. Rows sit on the rules; the amber margin line is where a
   notebook's margin is (inline-start), and the day of the month is written in it. */
.stage { position: relative; }
.ledger {
  position: relative; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 0 8px; max-width: 440px; margin-inline: auto; overflow: hidden;
}
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 20px 12px 20px; padding-inline-start: 64px; }
.ledger-head strong { font-size: 1.0625rem; }
.ledger-head span { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.ledger ol { list-style: none; margin: 0; padding: 0; position: relative; border-block-start: 1px solid var(--rule); }
.ledger ol::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 48px; width: 2px; background: var(--amber); z-index: 1; }
.ledger li {
  position: relative; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 0 12px;
  height: var(--row); padding-inline-end: 20px; border-block-end: 1px solid var(--rule);
}
.ledger .day { text-align: center; color: var(--muted); font-size: .8125rem; font-weight: 700; }
.ledger .what { padding-inline-start: 6px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger .what small { color: var(--muted); font-weight: 400; font-size: .8125rem; margin-inline-start: 6px; }
.amt { font-weight: 700; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.amt.out { color: var(--expense); }
.amt.in { color: var(--income); }
.amt .cur { font-weight: 600; font-size: .85em; }
.ledger li.fx { z-index: 2; }
.ledger li.fx .pair { display: inline-flex; align-items: center; gap: 8px; position: relative; padding: 4px 10px; isolation: isolate; }
.ledger li.fx .pair::before {
  content: ""; position: absolute; inset: 2px -2px; background: var(--amber-soft); border-radius: 8px; z-index: -1;
  transform-origin: var(--origin);
}
.ledger li.fx .eq { color: var(--muted); font-weight: 700; }
.ledger li.blank { height: calc(var(--row) - 8px); }
.ledger-note { padding: 10px 20px 6px; padding-inline-start: 64px; color: var(--muted); font-size: .8125rem; }

/* The phone frame around real screenshots */
.phone { width: 270px; padding: 9px; background: #0C1715; border-radius: 42px; box-shadow: var(--shadow), 0 30px 60px -30px rgb(10 59 54 / .45); }
.phone img { border-radius: 33px; width: 100%; aspect-ratio: 9 / 16; background: var(--mint-soft); }

.stage .phone { margin: 28px auto 0; width: 232px; }
.stage-caption { text-align: center; color: var(--muted); font-size: .875rem; font-weight: 600; margin-block-start: 14px; }

@media (min-width: 960px) {
  .hero { padding-block: 72px 96px; }
  .hero .wrap { grid-template-columns: 1.02fr 1fr; gap: 40px; }
  .stage { min-height: 600px; }
  .stage .phone { position: absolute; inset-inline-end: 0; top: 0; margin: 0; width: 290px; }
  .stage .ledger { position: absolute; inset-inline-start: 0; top: 150px; width: 380px; z-index: 3; margin: 0; }
  .stage-caption { position: absolute; inset-inline-start: 0; top: 108px; width: 380px; text-align: start; margin: 0; }
}

/* The one motion moment: rows ink in, then the exchange row is highlighted. */
@media (prefers-reduced-motion: no-preference) {
  .ledger li:not(.blank) { animation: ink .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 110ms + 250ms); }
  .ledger li.fx .pair::before { animation: mark .55s cubic-bezier(.3,.7,.2,1) 1.05s both; }
}
@keyframes ink { from { opacity: 0; transform: translateY(6px); } }
@keyframes mark { from { transform: scaleX(0); } }

/* Sections */
section { scroll-margin-top: 80px; }
.sec { padding-block: 88px; }
.sec-head { max-width: 40em; margin-block-end: 48px; }
.sec-head h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 800; margin-block: 10px 12px; }
.sec-head p { color: var(--muted); font-size: 1.125rem; }

.feature { display: grid; gap: 32px; align-items: center; padding-block: 40px; border-block-start: 1px solid var(--rule); }
.feature:first-of-type { border-block-start: 0; padding-block-start: 0; }
.feature h3 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 800; margin-block-end: 12px; }
.feature p { color: var(--muted); font-size: 1.0625rem; max-width: 32em; }
.feature ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.feature li { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.feature li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 3px; background: var(--amber); transform: translateY(-2px); }
.feature .phone { margin-inline: auto; width: 250px; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 56px; }
  .feature .phone { width: 280px; }
  .feature.flip .copy { order: 2; }
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); margin-block-start: 64px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 22px 22px 24px; border: 1px solid var(--rule); }
.tile h3 { font-size: 1.125rem; font-weight: 800; margin-block-end: 6px; display: flex; align-items: center; gap: 10px; }
.tile h3::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--amber); }
.tile p { color: var(--muted); font-size: .96875rem; }

/* Privacy band */
.night { background: var(--night); color: #fff; }
.night .eyebrow { color: var(--amber); }
.night .sec-head p { color: var(--night-muted); }
.night a { color: #fff; }
.night :focus-visible { outline-color: var(--amber); }
.locks { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); background: rgb(255 255 255 / .12); border-radius: var(--radius); overflow: hidden; }
.locks div { background: var(--night); padding: 26px 24px; }
.locks h3 { font-size: 1.125rem; font-weight: 800; margin-block-end: 6px; color: #fff; }
.locks p { color: var(--night-muted); font-size: .96875rem; }
.locks .k { display: block; color: var(--amber); font-weight: 800; font-size: .8125rem; margin-block-end: 8px; letter-spacing: .02em; }
.night .more { margin-block-start: 28px; color: var(--night-muted); }

/* Coming soon */
.soon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 22px 24px; border: 1px dashed #9CC2BB; border-radius: var(--radius); }
.soon strong { margin-inline-end: 6px; }
.soon span { background: var(--mint-soft); color: var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: .9375rem; }
.soon small { flex-basis: 100%; color: var(--muted); font-size: .875rem; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-block-end: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding-block: 12px; font-weight: 700; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--mint-soft); color: var(--teal); font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-block-end: 20px; max-width: 44em; }

/* Closing call to action */
.closing { background: var(--card); border-radius: 28px; border: 1px solid var(--rule); padding: clamp(28px, 5vw, 56px); display: grid; gap: 24px; align-items: center; }
.closing h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 800; margin-block-end: 8px; }
.closing p { color: var(--muted); }
.closing .cta-row { margin: 0; }
@media (min-width: 860px) { .closing { grid-template-columns: 1fr auto; } }

/* Footer */
.foot { padding-block: 56px 40px; color: var(--muted); font-size: .9375rem; }
.foot .wrap { display: grid; gap: 28px; }
.foot h2 { font-size: .8125rem; font-weight: 800; color: var(--ink); margin-block-end: 6px; letter-spacing: .02em; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.foot li a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px; margin-inline-start: -8px; color: var(--muted); }
.foot li a:hover { color: var(--teal); }
.foot .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.foot .by { border-block-start: 1px solid var(--rule); padding-block-start: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Privacy policy page */
.doc { padding-block: 48px 72px; }
.doc .wrap { max-width: 800px; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 8px 28px; }
.doc .toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 12px; background: var(--mint-soft); text-decoration: none; font-weight: 700; }
.doc article { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); margin-block-start: 20px; }
.doc article[lang="en"] { direction: ltr; text-align: left; line-height: 1.6; }
.doc h1 { font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.25rem); font-weight: 800; }
.doc h2 { font-size: 1.25rem; font-weight: 800; color: var(--teal); margin-block: 28px 8px; scroll-margin-top: 84px; }
.doc p, .doc li { color: #2B3A37; }
.doc p + p { margin-block-start: 10px; }
.doc ul { padding-inline-start: 1.3em; margin: 8px 0; }
.doc li + li { margin-block-start: 6px; }
.doc .updated { color: var(--muted); font-size: .875rem; margin-block: 6px 18px; }
.doc h1 { margin-block: 10px 4px; }
.doc article > h2:first-child { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); color: var(--ink); margin-block-start: 0; }
.btn-sm { white-space: nowrap; }
.xs-show { display: none; }
@media (max-width: 480px) { .xs-hide { display: none; } .xs-show { display: inline; } }
.doc .h1-alt { display: block; font-size: .6em; font-weight: 700; color: var(--muted); }
