/* One Artifex · shared design system.
   Tokens, type and spacing mirror the app's own src/index.css so the site
   and the product read as one thing. Pine green is reserved for money. */

/* ---------- tokens (app parity: src/index.css "Paper" direction) ---------- */
:root {
  --paper: #f6f1e6;
  --paper-2: #fcf9f1;
  --ink: #221d14;
  --ink-2: #5e5644;
  --ink-3: #756c59;
  --rule: #e8dfc9;
  --rule-strong: #d8ccac;
  --accent: #0e5f53;       /* pine: totals and amounts only */
  --accent-ink: #0a4a41;
  --warn: #8a6f33;
  --p1: #c05b3c;
  --p2: #3e6fa8;
  --p3: #7a5ca8;
  --btn: #221d14;
  --btn-text: #f6f1e6;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(34, 29, 20, 0.04), 0 8px 28px rgba(34, 29, 20, 0.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171410;
    --paper-2: #1f1b14;
    --ink: #ede7d8;
    --ink-2: #a49c8b;
    --ink-3: #8a8477;
    --rule: #2e2921;
    --rule-strong: #453e30;
    --accent: #48a893;
    --accent-ink: #6fc0ac;
    --warn: #cba85c;
    --p1: #d0755a;
    --p2: #6b92c4;
    --p3: #9b82c6;
    --btn: #ede7d8;
    --btn-text: #171410;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.28);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  /* The app's ruled-paper grain, every 28px. */
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, rgba(0, 0, 0, 0.012) 27px 28px),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
  body {
    background:
      repeating-linear-gradient(0deg, transparent 0 27px, rgba(255, 255, 255, 0.013) 27px 28px),
      var(--paper);
  }
}

img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; line-height: 1.1; font-weight: 700; }
p { margin: 0; }
a { color: var(--accent-ink); }

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

:focus-visible {
  /* The app's own ink, not the browser's blue. */
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */
.site {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand__mark {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 22%;
  box-shadow: 0 1px 2px rgba(12, 63, 57, 0.28);
}
.brand__dim { color: var(--ink-3); font-weight: 500; }
@media (max-width: 420px) { .brand__dim { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn--primary { background: var(--btn); color: var(--btn-text); }
.btn--ghost { background: var(--paper-2); color: var(--ink); border-color: var(--rule-strong); }
.btn--sm { padding: 9px 15px; font-size: 15px; }
.btn:hover { transform: translateY(-1px); }
.btn--ghost:hover { border-color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transition: none; transform: none; }
}

/* ---------- section scaffolding ---------- */
.sec { padding-block: clamp(52px, 9vw, 86px); scroll-margin-top: 76px; }
.sec + .sec { border-top: 1px dashed var(--rule-strong); }
.sec__n {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.sec__h { font-size: clamp(1.55rem, 4.1vw, 2.15rem); max-width: 22ch; }
.sec__p {
  margin-top: 14px;
  color: var(--ink-2);
  max-width: 54ch;
  font-size: clamp(1rem, 2.2vw, 1.08rem);
}
.sec__p + .sec__p { margin-top: 10px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(44px, 8vw, 76px) clamp(52px, 9vw, 80px); }
.hero__grid {
  display: grid;
  gap: clamp(36px, 6vw, 56px);
  align-items: center;
}
.hero__grid > * { min-width: 0; }
@media (min-width: 880px) {
  .hero__grid { grid-template-columns: 1.02fr 0.98fr; }
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 20px;
}
h1 { font-size: clamp(2.15rem, 7.4vw, 3.5rem); letter-spacing: -0.035em; }
.hero__lead {
  margin-top: 20px;
  font-size: clamp(1.06rem, 2.6vw, 1.26rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 40ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero__fine {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-3);
}

/* ---------- the receipt mock ---------- */
.rcpt {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px 20px;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
}
.rcpt__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.rcpt__merchant { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.rcpt__meta { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.rcpt__rows { margin: 0; padding: 0; list-style: none; }
.row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.row__name { font-size: 14.5px; min-width: 0; }
.row__name b { font-weight: 600; }
.row__name span { display: block; font-size: 12px; color: var(--ink-3); }
.row__amt { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dots { display: inline-flex; align-items: center; }
.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--paper-2);
  flex: none;
}
.dots .dot + .dot { margin-left: -5px; }
.dot--1 { background: var(--p1); }
.dot--2 { background: var(--p2); }
.dot--3 { background: var(--p3); }

.rcpt__charges { margin-top: 14px; padding-top: 4px; }
.charge {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 14px;
  color: var(--ink-2);
}
.charge__k { color: var(--ink-3); }
.charge--total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-strong);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.charge--total .charge__v { color: var(--accent); font-size: 17px; }

.tear {
  height: 14px;
  margin: 18px -20px 16px;
  border-top: 1px dashed var(--rule-strong);
  position: relative;
}
.tear::before, .tear::after {
  content: '';
  position: absolute;
  top: -7px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--rule);
}
.tear::before { left: -7px; }
.tear::after { right: -7px; }

.split__cap {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.share {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}
.share__name { font-size: 14.5px; font-weight: 600; flex: 1; }
.share__amt {
  font-family: var(--mono);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.rcpt__foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
}
.rcpt__foot b { color: var(--ink-2); font-weight: 600; }

/* ---------- step list ---------- */
.steps {
  display: grid;
  gap: 18px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.step {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
}
.step__n {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 12px;
}
.step h3 { font-size: 1.12rem; }
.step p { margin-top: 7px; font-size: 15px; color: var(--ink-2); }

/* ---------- generic two-column feature ---------- */
.feat {
  display: grid;
  gap: clamp(30px, 5vw, 48px);
  align-items: center;
}
.feat > * { min-width: 0; }
@media (min-width: 880px) {
  .feat { grid-template-columns: 1fr 1fr; }
  .feat--flip .feat__art { order: -1; }
}
.panel {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  max-width: 420px;
  margin-inline: auto;
  width: 100%;
}
.panel__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  font-weight: 700;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.live__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* claim rows */
.claim {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.claim:last-child { border-bottom: 0; }
.claim__box {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid var(--rule-strong);
  display: grid;
  place-items: center;
}
.claim__box--on { background: var(--accent); border-color: var(--accent); color: var(--paper-2); }
.claim__box--on::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}
.claim__name { flex: 1; font-size: 14.5px; }
.claim__name small { display: block; font-size: 12px; color: var(--ink-3); }
.claim__amt { font-family: var(--mono); font-size: 14px; color: var(--ink-2); }
.panel__foot {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--rule-strong);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}
.panel__foot .mono { color: var(--accent); font-size: 16px; font-weight: 600; }
.linkchip {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
  background: var(--paper);
  border: 1px dashed var(--rule-strong);
  border-radius: 8px;
  padding: 9px 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* tab + settle up */
.bill {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.bill__name { font-size: 14.5px; font-weight: 600; }
.bill__amt { font-family: var(--mono); font-size: 14px; color: var(--ink-2); text-align: right; }
.bill__payer { font-size: 12.5px; color: var(--ink-3); grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.settle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14.5px;
}
.settle:last-child { border-bottom: 0; }
.claim:has(+ .panel__foot),
.bill:has(+ .tear),
.settle:has(+ .rcpt__foot) { border-bottom: 0; }
.settle__arrow { color: var(--ink-3); font-family: var(--mono); }
.settle__amt { margin-left: auto; font-family: var(--mono); font-weight: 600; color: var(--accent); }

/* ---------- plain point lists ---------- */
.points { margin: 26px 0 0; padding: 0; list-style: none; max-width: 64ch; }
.points li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 15.5px;
}
.points li:last-child { margin-bottom: 0; }
.points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.points b { color: var(--ink); font-weight: 600; }

/* ---------- currency chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
}
.chip b { font-weight: 600; }
.chip span { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { margin-top: 30px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 2px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16.5px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  margin-left: auto;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink-3);
  line-height: 1;
}
.faq details[open] summary::after { content: '·'; }
.faq p {
  padding: 0 34px 20px 2px;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 62ch;
}

/* ---------- closing CTA ---------- */
.close { text-align: center; }
.close .sec__h { margin-inline: auto; }
.close .sec__p { margin-inline: auto; }
.close__cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--rule-strong);
  padding-block: 34px;
  padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--ink-3);
}
.foot__links { display: flex; flex-wrap: wrap; gap: 20px; }
.foot__links a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.foot__links a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- header nav ----------
   Anchor links into the numbered sections. Hidden below 900px rather than
   collapsed behind a hamburger, because the page ships no JavaScript and the
   sections are short enough to scroll on a phone. */
.site__nav {
  display: none;
  gap: 4px;
  margin-inline: auto;
}
.site__nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 8px;
}
.site__nav a:hover { color: var(--ink); background: var(--paper-2); }
@media (min-width: 900px) { .site__nav { display: flex; } }

/* ---------- footer ---------- */
.foot__top {
  display: grid;
  gap: 32px;
  padding-bottom: 32px;
}
@media (min-width: 720px) {
  .foot__top { grid-template-columns: 1fr 1.35fr; gap: 48px; }
}
.foot__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.foot__blurb {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--ink-3);
  max-width: 44ch;
  line-height: 1.55;
}
.foot__nav {
  display: grid;
  /* auto-fit so the columns reflow from three to two to one without a
     breakpoint for each arrangement. */
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 28px;
}
.foot__col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot__col h3 {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.foot__col a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
}
.foot__col a:hover { color: var(--ink); text-decoration: underline; }
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---------- legal pages (/privacy, /terms) ---------- */
.legal { padding-block: clamp(40px, 7vw, 64px) clamp(56px, 9vw, 88px); }
.legal__head { padding-bottom: 28px; border-bottom: 1px dashed var(--rule-strong); margin-bottom: 36px; }
.legal h1 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); }
.legal__meta {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.legal__lead { margin-top: 18px; font-size: clamp(1.02rem, 2.3vw, 1.14rem); color: var(--ink-2); max-width: 62ch; }
.legal__body { max-width: 68ch; }
.legal__body h2 {
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  margin-top: 40px;
  scroll-margin-top: 76px;
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body h3 { font-size: 1.02rem; margin-top: 26px; }
.legal__body p { margin-top: 12px; color: var(--ink-2); font-size: 15.8px; }
.legal__body ul { margin: 14px 0 0; padding: 0; list-style: none; }
.legal__body li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--ink-2);
  font-size: 15.8px;
}
.legal__body li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.legal__body b { color: var(--ink); font-weight: 600; }
.legal__note {
  margin-top: 36px;
  padding: 18px 20px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 14.8px;
  color: var(--ink-2);
}
.legal__back {
  display: inline-block;
  margin-top: 40px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.legal__back:hover { text-decoration: underline; }

/* ---------- mail button ---------- */
.btn--mail {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: -0.02em;
  word-break: break-all;
  text-align: left;
}
.btn--mail svg { width: 17px; height: 17px; flex: none; }
.contact__note { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
