/* ============================================================
   Landing page for BunSpend, the Android app.

   Colours are the app's own (android/core/design/theme/Colors.kt:
   Cream and Cocoa), and the paper is the launcher's own background
   (#FEF0DC), so the wordmark and the app icon sit on the page with no
   visible edge around them.

   Plain CSS on purpose: Cloudflare Pages serves this folder as it
   stands, with no build step.
   ============================================================ */

:root {
  color-scheme: light;

  --page: #fef0dc;
  --page-edge: #f8e6cd;
  --surface: #fffdf8;
  --surface-2: #f7eedf;
  --surface-3: #efe2cc;

  --ink: #3b2b21;
  --ink-2: #6f5b4a;
  --ink-3: #7a6752;
  --line: #eadcc6;
  --line-strong: #dcc9ae;

  --accent: #e2705a;
  --accent-strong: #c85e4a;
  --accent-contrast: #fff8f2;
  --positive: #4e8a5b;
  --plum: #8b6fa8;

  --shadow-card: 0 1px 0 rgba(59, 43, 33, 0.03), 0 12px 26px -22px rgba(59, 43, 33, 0.55);
  --shadow-float: 0 18px 34px -18px rgba(59, 43, 33, 0.42);

  /* category tints, straight from the app */
  --t-food: #fbe3d2;
  --t-rent: #e7e5d8;
  --t-bills: #e4e2f6;
  --t-health: #d6eee9;

  --wordmark-bg: #fef0dc;
  --font: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --radius: 22px;
  --radius-lg: 26px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --page: #1e1713;
    --page-edge: #171210;
    --surface: #2a211b;
    --surface-2: #33291f;
    --surface-3: #3b3026;

    --ink: #f7ede0;
    --ink-2: #c3b3a3;
    --ink-3: #a89786;
    --line: #3a2f26;
    --line-strong: #4a3d31;

    --accent: #f08a72;
    --accent-strong: #e07763;
    --accent-contrast: #241a13;
    --positive: #7fbf8c;

    --shadow-card: 0 1px 0 rgba(0, 0, 0, 0.2), 0 16px 30px -24px rgba(0, 0, 0, 0.9);
    --shadow-float: 0 20px 38px -20px rgba(0, 0, 0, 0.85);

    --t-food: #4a3222;
    --t-rent: #3d3a2c;
    --t-bills: #322e46;
    --t-health: #1f3a35;

    /* the dark wordmark is drawn on its own brown card, so the card is
       painted the exact colour of that drawing rather than guessed at */
    --wordmark-bg: #492f1d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--page);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 460px at 82% -6%, var(--page-edge), transparent 70%),
    var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

main,
.site-head {
  width: min(1060px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.wordmark {
  width: 150px;
  height: auto;
  border-radius: 10px;
  background: var(--wordmark-bg);
}

.wordmark-dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .wordmark-light {
    display: none;
  }

  .wordmark-dark {
    display: block;
  }
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink-2);
}

.site-nav a:hover {
  color: var(--ink);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 52px;
  align-items: center;
  padding: 40px 0 30px;
}

.eyebrow {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1 {
  margin-top: 14px;
  font-size: clamp(31px, 4.4vw, 49px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.lede {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 17.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 21px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 800;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-float);
}

.button-primary:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.button-quiet {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.button-quiet:hover {
  border-color: var(--accent);
}

.fineprint {
  margin-top: 16px;
  max-width: 50ch;
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--ink-3);
}

/* ---------- the phone ---------- */

.hero-art {
  position: relative;
  padding: 8px 10px 40px;
  justify-self: center;
}

.phone {
  width: min(320px, 78vw);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 34px;
  box-shadow: var(--shadow-float);
  padding: 10px;
}

.phone-screen {
  background: var(--page);
  border-radius: 26px;
  padding: 12px 12px 6px;
  overflow: hidden;
}

.ws-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
}

.ws-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ws-text strong {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.ws-text span {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-switch {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-strong);
}

.month-row {
  padding: 14px 2px 2px;
}

.month-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.total {
  padding: 2px 2px 12px;
}

.total-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-3);
}

.total-value {
  display: block;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.phone-rows {
  display: grid;
  gap: 2px;
  padding-bottom: 10px;
}

.phone-rows li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 2px;
}

.tint {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}

.tint-food { background: var(--t-food); box-shadow: inset 0 0 0 1px rgba(185, 102, 58, 0.35); }
.tint-rent { background: var(--t-rent); box-shadow: inset 0 0 0 1px rgba(109, 106, 74, 0.3); }
.tint-bills { background: var(--t-bills); box-shadow: inset 0 0 0 1px rgba(86, 74, 147, 0.3); }
.tint-health { background: var(--t-health); box-shadow: inset 0 0 0 1px rgba(43, 117, 104, 0.3); }

.row-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
}

.row-amount {
  margin-left: auto;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* the bottom bar, matching the app: five tabs and one round Add */
/* The app's bottom bar: five tabs and one round Add in the middle. */
.tabbar {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-top: 8px;
  padding: 6px 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 7.5px;
  font-weight: 700;
  color: var(--ink-3);
  white-space: nowrap;
}

.tab svg {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}

.tab:first-child {
  color: var(--ink);
}

.tab:first-child svg {
  color: var(--ink);
}

.tab-add {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 8px 18px -10px rgba(194, 94, 74, 0.9);
}

.tab-add svg {
  width: 15px;
  height: 15px;
  color: var(--accent-contrast);
}

.bun-hero {
  position: absolute;
  right: -6px;
  bottom: 0;
  width: 150px;
  height: auto;
  filter: drop-shadow(0 16px 20px rgba(59, 43, 33, 0.18));
}

/* ---------- sections ---------- */

.section {
  padding: 46px 0;
}

.section-title {
  font-size: clamp(23px, 2.7vw, 30px);
  font-weight: 900;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

.section-lede {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 16px;
  color: var(--ink-2);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px;
}

.card-icon {
  width: 30px;
  height: 30px;
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.card h3 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card p {
  margin-top: 8px;
  font-size: 14.6px;
  color: var(--ink-2);
}

/* ---------- family ---------- */

.family {
  display: grid;
  grid-template-columns: 1.32fr 1fr;
  gap: 40px;
  align-items: start;
}

.steps {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-strong);
}

.steps h3 {
  font-size: 15.8px;
  font-weight: 800;
}

.steps p {
  margin-top: 4px;
  max-width: 48ch;
  font-size: 14.4px;
  color: var(--ink-2);
}

.note-card {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
}

.note-card h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.checks {
  margin-top: 14px;
  display: grid;
  gap: 11px;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.4px;
  color: var(--ink-2);
}

.checks li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
}

.checks .done::before {
  background: var(--positive);
}

.checks .next::before {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.checks .next {
  color: var(--ink-3);
}

/* ---------- privacy ---------- */

.privacy {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ---------- get ---------- */

.get {
  text-align: center;
  padding-bottom: 20px;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-card);
}

.get .section-lede {
  margin-inline: auto;
}

.get .cta-row {
  justify-content: center;
}

.get .fineprint {
  margin-inline: auto;
  text-align: center;
}

/* ---------- footer ---------- */

.site-foot {
  position: relative;
  width: min(1060px, 100% - 40px);
  margin-inline: auto;
  padding: 26px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
}

.bun-peek {
  position: absolute;
  top: -52px;
  right: 6px;
  width: 72px;
  height: auto;
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.foot-left {
  font-weight: 700;
}

.foot-right {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 700;
}

.foot-right a:hover {
  color: var(--ink);
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 24px;
  }

  .hero-art {
    order: 2;
    padding-bottom: 34px;
  }

  .bun-hero {
    width: 128px;
    right: 2px;
  }

  .family,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main,
  .site-head,
  .site-foot {
    width: min(1060px, 100% - 32px);
  }

  .wordmark {
    width: 124px;
  }

  .site-nav a:nth-child(1) {
    display: none;
  }

  .cta-row .button {
    flex: 1 1 100%;
    justify-content: center;
  }

  .section {
    padding: 34px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }

  .button-primary:hover {
    transform: none;
  }
}
