/* Floskoop site: the app's "receipt" identity. Paper canvas, white receipt paper, ink, one red coin. */
:root {
  --paper: #f1f0eb;
  --receipt: #ffffff;
  --ink: #121212;
  --muted: #6e6b63;
  --faint: #a6a399;
  --rule: #dcd9d0;
  --coin: #d23b2e;
  --income: #1f6b4a;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --arabic: "Noto Naskh Arabic", "Geeza Pro", serif;
  --measure: 68ch;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141310;
    --receipt: #1e1d19;
    --ink: #f2f0ea;
    --muted: #9a968b;
    --faint: #6b685f;
    --rule: #33322c;
    --coin: #e5584a;
    --income: #4fa77e;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--arabic), var(--sans); font-size: 18px; line-height: 1.75; }
a { color: inherit; text-decoration-color: var(--faint); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.num, .mono { font-family: var(--mono); font-feature-settings: "tnum" 1; direction: ltr; unicode-bidi: isolate; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ── header & footer ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.top .brand img { height: 34px; width: auto; display: block; }
.top nav { 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); }
.lang { font-weight: 600; color: var(--ink) !important; }
@media (max-width: 560px) { .top nav .hide-sm { display: none; } }

.foot { border-top: 1px solid var(--rule); margin-top: 96px; padding-block: 28px 48px; color: var(--muted); font-size: 14.5px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ── hero ── */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding-block: 48px 72px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 24px 48px; } }
.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 22px;
}
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.25; font-weight: 700; }
.hero p.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34ch; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.soon { cursor: default; }
.btn-note { color: var(--muted); font-size: 14.5px; }

/* the demo: a messy order card that becomes an itemised receipt */
.demo { position: relative; display: grid; grid-template-columns: 0.8fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 520px) { .demo { grid-template-columns: 1fr; } .order { max-width: 260px; } }
.order {
  background: var(--receipt); border: 1px solid var(--rule); border-radius: 18px; padding: 14px;
  font-size: 13px; transform: rotate(-3deg); margin-top: 28px;
  box-shadow: 0 18px 40px -24px rgba(18, 18, 18, 0.35);
}
.order .bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.order .bar i { width: 26px; height: 26px; border-radius: 8px; background: #ff5a00; display: grid; place-items: center; color: #fff; font: 700 13px var(--sans); font-style: normal; }
.order .bar b { font-weight: 600; }
.order .ln { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; color: var(--muted); }
.order .ln span:last-child { color: var(--ink); }
.order .blur { height: 7px; border-radius: 4px; background: var(--rule); margin: 7px 0; }
.order .tot { border-top: 1px solid var(--rule); margin-top: 6px; padding-top: 8px; display: flex; justify-content: space-between; font-weight: 600; color: var(--ink); }

.receipt {
  background: var(--receipt); padding: 20px 18px 8px; position: relative;
  box-shadow: 0 24px 48px -28px rgba(18, 18, 18, 0.4);
  font-size: 14px;
  --tear: 10px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tear)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tear) * 2) var(--tear) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tear)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--tear) * 2) var(--tear) repeat-x;
  padding-bottom: calc(18px + var(--tear));
}
.receipt header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed var(--rule); padding-bottom: 12px; margin-bottom: 8px; }
.receipt header b { font-size: 15px; }
.receipt header small { color: var(--muted); font-size: 12px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 7px 0; }
.item .n { font-weight: 500; }
.item .q { grid-column: 1; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.item .p { grid-row: 1; grid-column: 2; text-align: end; }
.tag { display: inline-flex; align-items: center; gap: 5px; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--c, var(--muted)); }
.receipt .sum { border-top: 1px dashed var(--rule); margin-top: 6px; padding-top: 10px; display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; }
.receipt .fee { color: var(--muted); }
.receipt-wrap { position: relative; }
.stamp { position: absolute; z-index: 2; inset-inline-end: -10px; top: -14px; background: var(--ink); color: var(--paper); font: 600 12px var(--sans); padding: 6px 10px; border-radius: 999px; transform: rotate(4deg); }
html[lang="ar"] .stamp { font-family: var(--arabic); }

@media (prefers-reduced-motion: no-preference) {
  .receipt { animation: print 1.1s cubic-bezier(.2,.7,.2,1) .35s both; }
  .receipt .item, .receipt .sum { animation: line .35s ease-out both; }
  .receipt .item:nth-child(2) { animation-delay: .7s; } .receipt .item:nth-child(3) { animation-delay: .8s; }
  .receipt .item:nth-child(4) { animation-delay: .9s; } .receipt .item:nth-child(5) { animation-delay: 1s; }
  .receipt .item:nth-child(6) { animation-delay: 1.1s; } .receipt .item:nth-child(7) { animation-delay: 1.2s; }
  .receipt .sum { animation-delay: 1.35s; }
  .stamp { animation: line .3s ease-out 1.6s both; }
}
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@keyframes line { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── sections ── */
section.band { padding-block: 56px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 14px; max-width: 22ch; }
html[lang="ar"] h2 { letter-spacing: 0; line-height: 1.35; font-weight: 700; }
.sub { color: var(--muted); max-width: 52ch; margin: 0 0 36px; font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); counter-reset: s; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 22px 24px 8px 0; counter-increment: s; }
html[dir="rtl"] .step { padding: 22px 0 8px 24px; }
.step::before { content: counter(s, decimal-leading-zero); font: 500 14px var(--mono); color: var(--muted); display: block; margin-bottom: 18px; }
.step h3 { font-size: 22px; margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--muted); }

/* features as receipt lines with dotted leaders */
.ledger { background: var(--receipt); border-radius: 4px; padding: 10px 28px 18px; max-width: 820px; box-shadow: 0 1px 0 var(--rule); }
.ledger .row { display: flex; align-items: baseline; gap: 12px; padding: 16px 0; border-bottom: 1px dashed var(--rule); }
.ledger .row:last-child { border-bottom: 0; }
.ledger .row b { font-weight: 600; font-size: 18px; white-space: nowrap; }
.ledger .row .dots { flex: 1; border-bottom: 2px dotted var(--faint); transform: translateY(-5px); min-width: 24px; }
.ledger .row span { color: var(--muted); text-align: end; max-width: 40ch; }
@media (max-width: 640px) { .ledger { padding-inline: 18px; } .ledger .row { flex-wrap: wrap; } .ledger .row .dots { display: none; } .ledger .row span { text-align: start; flex-basis: 100%; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.chip { border: 1px solid var(--rule); background: var(--receipt); border-radius: 999px; padding: 8px 14px; font-size: 15px; }
.rates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rate { background: var(--receipt); border-radius: 14px; padding: 18px; }
.rate small { color: var(--muted); display: block; font-size: 13.5px; }
.rate strong { font-weight: 600; font-size: 22px; display: block; margin-top: 6px; letter-spacing: -0.01em; }
.rate em { font-style: normal; color: var(--muted); font-size: 13px; }

.closing { text-align: center; padding-block: 72px 24px; }
.closing h2 { margin-inline: auto; }
.closing .cta { justify-content: center; }
.coin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--coin); vertical-align: middle; margin-inline-end: 8px; }

/* ── documents (privacy, terms, support) ── */
.doc { max-width: var(--measure); padding-block: 24px 0; }
.doc h1 { font-size: clamp(34px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1.05; margin: 8px 0 10px; font-weight: 600; }
html[lang="ar"] .doc h1 { letter-spacing: 0; line-height: 1.3; font-weight: 700; }
.doc .meta { color: var(--muted); font-size: 15px; margin-bottom: 36px; }
.doc h2 { font-size: 23px; letter-spacing: -0.01em; margin: 40px 0 10px; max-width: none; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-inline-start: 22px; }
.doc li { margin: 6px 0; }
.doc .note { background: var(--receipt); border-radius: 12px; padding: 16px 18px; color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 8px 0 16px; }
.doc th, .doc td { text-align: start; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); }
html[dir="rtl"] .doc th, html[dir="rtl"] .doc td { padding: 10px 0 10px 12px; }
.doc th { font-weight: 600; font-size: 14px; color: var(--muted); }
.doc ol.how { counter-reset: h; list-style: none; padding: 0; }
.doc ol.how li { counter-increment: h; display: flex; gap: 14px; margin: 14px 0; }
.doc ol.how li::before { content: counter(h); font: 600 13px var(--mono); width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; flex: none; margin-top: 2px; }
