:root {
  --bg: #f7f3ea;
  --bg-deep: #efe7da;
  --ink: #1e1a16;
  --muted: #6c5f52;
  --accent: #d97747;
  --accent-strong: #b95a2f;
  --card: #fffaf2;
  --line: #e2d6c7;
  --success-bg: #e8f5ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff7eb, transparent 55%),
    radial-gradient(circle at 30% 10%, #f2dfcd, transparent 55%),
    linear-gradient(120deg, var(--bg), var(--bg-deep));
  line-height: 1.55;
}

a { color: var(--accent-strong); }

h1, h2 { font-family: "Fraunces", Georgia, serif; font-weight: 800; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 16px; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 12px; }

.site-header, main, .site-footer { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.site-header { padding-top: 24px; }

.brand { font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: 1.4rem; color: var(--ink); text-decoration: none; }
.brand-dot { color: var(--accent); }

section { padding: 40px 0; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-top: 32px; }
.lede { color: var(--muted); font-size: 1.08rem; margin: 0 0 24px; }

/* Forms */
.interest-form { display: grid; gap: 12px; max-width: 460px; }
.form-heading { font-size: 1.35rem; margin: 0 0 2px; }
.field { display: grid; gap: 4px; }
.field span { font-size: 0.85rem; font-weight: 600; }
.field input, .field select {
  font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn {
  font: inherit; font-weight: 700; font-size: 1rem; padding: 12px 18px; border: 0; border-radius: 999px;
  background: var(--accent-strong); color: #fff; cursor: pointer;
}
.btn:hover { background: #9a4a26; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.form-status { min-height: 1.2em; margin: 0; color: #8a3f1f; font-weight: 600; }
.form-status:empty { min-height: 0; }
.under { margin: 0; font-size: 0.82rem; color: var(--muted); }
.form-thanks { padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-weight: 600; max-width: 460px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Story */
.story { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: center; }
.founder-photo { width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line); }
.signoff { color: var(--muted); }
.story em { font-style: normal; color: var(--accent-strong); font-weight: 600; }

/* How it works */
.steps { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; max-width: 680px; }

/* Trust row */
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.trust p { margin: 6px 0 0; color: var(--muted); font-size: 0.92rem; }

.early p { max-width: 680px; }

.site-footer { padding-top: 24px; padding-bottom: 32px; color: var(--muted); font-size: 0.85rem; }

/* Thanks / error pages */
.thanks-page { max-width: 560px; padding: 64px 16px; }

/* Demo phone: mirrors app.bwak.money's Budget page, scoped here */
.hero-visual { position: sticky; top: 24px; }
.demo-phone { width: 300px; border-radius: 40px; background: #111; padding: 10px; box-shadow: 0 20px 44px rgba(30, 26, 22, 0.28); }
.demo-screen {
  position: relative; overflow: hidden; border-radius: 31px; font-size: 12px; color: var(--ink);
  background: radial-gradient(circle at top left, #fff7eb, transparent 55%), linear-gradient(120deg, var(--bg), var(--bg-deep));
  padding-bottom: 54px;
}
.demo-appbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 10px; }
.demo-title { font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: 17px; }
.demo-burger { border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 2px 8px; }
.demo-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; margin: 0 10px; padding: 12px; box-shadow: 0 10px 24px rgba(30, 26, 22, 0.08); }
.demo-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #fff4cc; border: 1px solid #f1d18a; font-weight: 700; }
.demo-alert { margin: 8px 0; padding: 7px 9px; border-radius: 8px; background: #eef5fb; border: 1px solid #c9dcee; line-height: 1.4; font-size: 11px; }
.demo-link { color: var(--accent-strong); text-decoration: underline; }
.demo-card table { width: 100%; border-collapse: collapse; }
.demo-card th, .demo-card td { text-align: left; padding: 5px 3px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); }
.demo-card th { color: var(--muted); font-weight: 600; }
.demo-card .r { text-align: right; }
.demo-muted { color: var(--muted); }
.demo-payoff-row td { transition: background-color 0.4s ease; }
.demo-payoff-row.is-lit td { background: var(--success-bg); }
.demo-sect { margin: 12px 0 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: #666; font-weight: 600; }
.demo-fab { position: absolute; right: 16px; bottom: 14px; background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 13px; font-weight: 700; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2); }
.demo-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px 18px;
  background: var(--card); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 24px rgba(30, 26, 22, 0.15);
  transform: translateY(105%); transition: transform 0.45s ease;
}
.demo-sheet.is-open { transform: translateY(0); }
.demo-sheet-title { font-weight: 700; margin-bottom: 8px; }
.demo-sheet-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.demo-sheet-save { margin-top: 10px; text-align: center; background: var(--accent); color: #fff; border-radius: 999px; padding: 8px; font-weight: 700; }
.demo-caption { margin: 14px 0 0; font-size: 0.92rem; color: var(--muted); max-width: 300px; }
.demo-caption strong { color: var(--ink); }

/* Mobile: headline, lede, phone, then form (.hero-copy children join the hero grid) */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-copy { display: contents; }
  .hero-copy h1 { order: 1; margin-bottom: 0; }
  .hero-copy .lede { order: 2; margin-bottom: 0; }
  .hero-visual { order: 3; position: static; display: flex; flex-direction: column; align-items: center; }
  .hero-copy .interest-form { order: 4; }
  .demo-phone { width: min(300px, 100%); }
  .story { grid-template-columns: 1fr; }
  .founder-photo { max-width: 320px; }
  .trust { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .trust { grid-template-columns: 1fr; }
}
