/* sparv.app (D155). Same tokens as the app (DESIGN §2): Paper and Ink follow the visitor's light or dark setting.
   Flat 1px lines, no shadows, spacing only 4/8/16/24/32 (and 64 = two steps of 32 between page sections). */

@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Inter_400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Inter_600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/PlusJakartaSans_700Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/PlusJakartaSans_800ExtraBold.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #111111;
  --muted: #666663;
  --line: #e6e6e3;
  --line-strong: #d4d4d0;
  --p-sage: #dcebdf;
  --p-sky: #dae7f4;
  --p-peach: #f8e0d0;
  --p-butter: #f5ebc3;
  --p-lilac: #e6e1f3;
  --p-rose: #f4dce1;
  --p-sand: #ece5da;
  --p-mint: #d8eee8;
  --on-pastel: #141414;
  --on-pastel-muted: #4a4a47;
  --income: #276f44;
  --income-soft: #dff0e5;
  --warn: #7d5b00;
  --warn-soft: #f6ebc6;
  --danger: #a8251e;
  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 32px;
  --section: calc(var(--s5) * 2);
  --radius: 16px;
  --r-sm: 10px;
  --r-lg: 24px;
  /* Brand gradient (D155): rust → wine → lavender, only on the app mark and the waitlist heading.
     Each stop is 4.5:1 or more against the page in both themes. */
  --brand-rust: #85300f;
  --brand-wine: #7a2e3e;
  --brand-lavender: #7e6a96;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #121212;
    --surface-2: #1a1a1a;
    --ink: #f4f4f2;
    --muted: #9c9c98;
    --line: #262626;
    --line-strong: #3d3d3a;
    --income: #90d3a9;
    --income-soft: #15261b;
    --warn: #efd37e;
    --warn-soft: #29230f;
    --danger: #f2a4a0;
    --brand-rust: #e59a72;
    --brand-wine: #e39aae;
    --brand-lavender: #c4b2dc;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--body);
  font-variant-numeric: tabular-nums;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--s3);
}
.skip {
  position: absolute;
  left: var(--s3);
  top: -64px;
  background: var(--ink);
  color: var(--bg);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
}
.skip:focus {
  top: var(--s3);
}
.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s2);
}
h1,
h2,
h3 {
  font-family: var(--display);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 800;
}
h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
}
h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
.muted {
  color: var(--muted);
}
section[id] {
  scroll-margin-top: var(--section);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top .wrap {
  display: flex;
  align-items: center;
  gap: var(--s4);
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s2);
  text-decoration: none;
  font: 800 20px var(--display);
  letter-spacing: -0.02em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
}
.nav {
  display: flex;
  gap: var(--s4);
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}
.nav a:hover {
  color: var(--ink);
}
@media (max-width: 720px) {
  .nav {
    display: none;
  }
  .top .btn {
    margin-left: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s4);
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font: 600 15px var(--body);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  opacity: 0.88;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn.small {
  min-height: 40px;
  padding: 0 var(--s3);
  font-size: 14px;
}
.btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

/* Hero */
.hero {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--s5);
  align-items: center;
}
.hero .lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 34em;
  margin: var(--s4) 0 var(--s5);
}
.hero .ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  align-items: center;
}
.hero .note {
  font-size: 14px;
  color: var(--muted);
  margin-top: var(--s3);
}
@media (max-width: 860px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* The demo: one sentence becomes cards (like the app's entry box and confirmation cards, F1 and F2) */
.demo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s4);
  display: grid;
  gap: var(--s3);
}
/* The entry box, like the app's: the sentence on the left, the send button on the right. */
.say {
  display: flex;
  gap: var(--s3);
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  min-height: 104px;
}
.say p {
  flex: 1;
  align-self: flex-start;
  font-size: 15px;
  line-height: 24px;
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}
.say p:empty::before {
  content: 'Type or say what you spent';
  color: var(--muted);
}
.say.typing p::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 1px;
  vertical-align: -3px;
  background: var(--ink);
  animation: caret 1s steps(1) infinite;
}
.say.sent p {
  opacity: 0;
  transform: translateY(var(--s2));
}
.send {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--muted);
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}
.say.typing .send,
.send.pressed {
  color: var(--bg);
  background: var(--ink);
}
.send.pressed {
  transform: scale(0.9);
}
.demo-cur {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.cards {
  transition: opacity 0.4s var(--ease);
}
.cards.fading {
  opacity: 0;
}
/* Cards drop in from above, one after another, top to bottom. */
.entry.arrive {
  animation: arrive 0.6s var(--ease) both;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(calc(var(--s3) * -1));
  }
}
@keyframes caret {
  50% {
    opacity: 0;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.arrow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.arrow::before,
.arrow::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}
.cards {
  display: grid;
  gap: var(--s2);
}
.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s1) var(--s3);
  padding: var(--s3);
  border-radius: var(--radius);
  color: var(--on-pastel);
}
.entry .what {
  font-weight: 600;
}
.entry .amt {
  font: 700 18px var(--display);
  text-align: right;
}
.entry .meta {
  font-size: 13px;
  color: var(--on-pastel-muted);
}
.entry .tag {
  font-size: 12px;
  font-weight: 600;
  justify-self: end;
}
.entry .tag.guess {
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 999px;
  padding: 0 var(--s2);
}
.peach {
  background: var(--p-peach);
}
.sky {
  background: var(--p-sky);
}
.sage {
  background: var(--p-sage);
}
.butter {
  background: var(--p-butter);
}
.rose {
  background: var(--p-rose);
}
.mint {
  background: var(--p-mint);
}
.sand {
  background: var(--p-sand);
}
.lilac {
  background: var(--p-lilac);
}
.demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.demo-head .label {
  margin: 0;
}
.demo-foot {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.sprite {
  display: none;
}
.more {
  margin-top: var(--s4);
  font-weight: 600;
}

/* Sections */
section.block {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--line);
}
/* Stacked pages: each section stays put once its end is on screen, and the next one slides up over it
   like the next sheet of a notebook. app.js sets each section's top and --cover (0 to 1, how far the next
   sheet has covered it). Off with Reduce motion, where app.js never adds .stack. */
.stack > section {
  position: sticky;
  background: var(--bg);
}
.stack > section.block {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.stack > .hero {
  border-bottom: 0;
}
.stack > section > .wrap {
  transform: scale(calc(1 - var(--cover, 0) * 0.04));
  opacity: calc(1 - var(--cover, 0) * 0.6);
  will-change: transform, opacity;
}
.stack + .foot {
  position: relative;
  background: var(--bg);
}
.head {
  max-width: 40em;
  margin-bottom: var(--s5);
}
.head p:not(.label) {
  color: var(--muted);
  font-size: 17px;
  margin-top: var(--s3);
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
  counter-reset: step;
}
.steps li {
  border-top: 1px solid var(--ink);
  padding-top: var(--s3);
  display: grid;
  gap: var(--s2);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  font: 800 32px var(--display);
}
.steps p {
  color: var(--muted);
}
@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.tile {
  border-radius: var(--radius);
  padding: var(--s4);
  color: var(--on-pastel);
  display: grid;
  align-content: start;
  gap: var(--s3);
}
/* Icon and heading on one line, like the privacy promises. */
.tile-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.tile-head h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tile p {
  color: var(--on-pastel-muted);
}
.tile .icon {
  flex: none;
  width: 24px;
  height: 24px;
}
.promises {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
}
.promises li {
  display: flex;
  gap: var(--s3);
  padding: var(--s4) var(--s3) var(--s4) 0;
  border-bottom: 1px solid var(--line);
}
.promises li div {
  display: grid;
  gap: var(--s1);
}
.promises p {
  color: var(--muted);
}
@media (max-width: 720px) {
  .promises {
    grid-template-columns: 1fr;
  }
}

/* Waitlist */
.join {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  align-items: start;
}
/* The waitlist heading is written in the brand gradient (D155); lighter stops in the dark theme keep it readable. */
#join-title {
  width: fit-content;
  background: linear-gradient(100deg, var(--brand-rust), var(--brand-wine) 55%, var(--brand-lavender));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (forced-colors: active) {
  #join-title {
    color: CanvasText;
    background: none;
  }
}
@media (max-width: 860px) {
  .join {
    grid-template-columns: 1fr;
  }
}
.form {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s4);
  display: grid;
  gap: var(--s3);
  background: var(--surface);
}
.form label.field {
  display: grid;
  gap: var(--s2);
  font-weight: 600;
  font-size: 14px;
}
.form input[type='email'] {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  padding: 0 var(--s3);
  font: 400 16px var(--body);
  width: 100%;
}
.form input[type='email']:focus {
  outline: 2px solid var(--ink);
  outline-offset: 0;
}
.consent {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}
.consent input {
  margin: var(--s1) 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  flex: none;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.status {
  font-size: 14px;
  min-height: 22px;
}
.status.ok {
  color: var(--income);
}
.status.bad {
  color: var(--danger);
}
.form.done .hide-when-done {
  display: none;
}

/* FAQ */
.faq {
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: var(--s3) 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font: 700 20px var(--display);
  line-height: 1;
}
.faq details[open] summary::after {
  content: '\2212';
}
.faq details p {
  color: var(--muted);
  margin-top: var(--s2);
  max-width: 46em;
}

/* Plain pages (support, 404) */
.page {
  padding: var(--section) 0;
}
.page .wrap {
  max-width: 720px;
}
.page h1 {
  font-size: clamp(36px, 6vw, 56px);
  margin-bottom: var(--s4);
}
.page h2 {
  font-size: 22px;
  margin: var(--s5) 0 var(--s2);
}
.page p,
.page li {
  color: var(--muted);
}
.page p + p {
  margin-top: var(--s3);
}
.contact {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s4);
}
.contact a {
  display: flex;
  gap: var(--s3);
  align-items: center;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}
.contact a span {
  display: grid;
}
.contact small {
  color: var(--muted);
  font-size: 14px;
}

/* Footer */
.foot {
  padding: var(--s5) 0;
  font-size: 14px;
  color: var(--muted);
}
.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s4);
  align-items: center;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  margin-left: auto;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink);
}
.page ul {
  margin: 0;
  padding-left: var(--s4);
  display: grid;
  gap: var(--s2);
}
.page strong {
  color: var(--ink);
}
