/* BAP — vintage bistro-menu design language, carried over from the app's
   theme tokens (src/theme/colors.ts): aged cream paper, tomato red doing
   almost all the talking, near-black print ink for reading. */

:root {
  --canvas: #F6F0E1;
  --surface: #FBF6E9;
  --surface-raised: #FDFAF0;
  --field: #EFE7D2;

  --ink: #26211A;
  --ink-muted: #695D4C;
  --ink-faint: #ADA28A;
  --ink-inverse: #FBF6E9;

  --primary: #D63A1F;
  --primary-deep: #8E2512;
  --accent: #4E7A3E;
  --citrus: #E9A83B;
  --butter: #F9EDCB;
  --gain: #2E9F5C;
  --gain-light: #E3F4E8;

  --rule: rgba(214, 58, 31, 0.22);
  --rule-strong: rgba(214, 58, 31, 0.38);
  --rule-soft: rgba(167, 155, 124, 0.34);

  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;

  --measure: 1040px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-deep); }

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary);
  text-decoration: none;
}

.wordmark img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--rule);
}

.masthead nav {
  display: flex;
  gap: 26px;
  font-size: 15px;
}

.masthead nav a {
  color: var(--ink-muted);
  text-decoration: none;
}

.masthead nav a:hover { color: var(--primary); }

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(64px, 11vw, 128px);
  text-align: center;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.04;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.015em;
}

.lede {
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--ink-muted);
  max-width: 34ch;
  margin: 0 auto 40px;
  line-height: 1.55;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--primary);
  color: var(--ink-inverse);
  font-size: 16px;
  font-weight: 600;
  padding: 15px 30px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--primary-deep);
}

.cta:hover { background: var(--primary-deep); color: var(--ink-inverse); }

.cta-note {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-faint);
}

/* ---------- Sections ---------- */

section { padding-block: clamp(56px, 8vw, 96px); }

.section-rule { border-top: 1px solid var(--rule); }

h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.18;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.section-intro {
  color: var(--ink-muted);
  max-width: 56ch;
  margin: 0 0 48px;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}

.step { border-top: 2px solid var(--primary); padding-top: 20px; }

.step h3 {
  font-family: var(--display);
  font-size: 21px;
  margin: 0 0 8px;
  font-weight: 700;
}

.step p { margin: 0; color: var(--ink-muted); font-size: 16px; }

.step .num {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}

/* ---------- Feature cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 28px;
}

.card h3 {
  font-family: var(--display);
  font-size: 20px;
  margin: 0 0 8px;
  font-weight: 700;
}

.card p { margin: 0; color: var(--ink-muted); font-size: 16px; }

/* ---------- Honest math ---------- */

.honest {
  background: var(--butter);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: clamp(28px, 5vw, 52px);
}

.honest h2 { margin-bottom: 14px; }
.honest p { color: var(--ink-muted); max-width: 60ch; margin: 0 0 28px; }

.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin: 0;
}

.ledger div {
  background: var(--surface-raised);
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 18px 20px;
}

.ledger dt {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.ledger dd {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Legal pages ---------- */

.legal { padding-block: clamp(48px, 7vw, 80px); }

.legal .doc { max-width: 72ch; }

.legal h1 {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 50px);
  margin: 0 0 10px;
  font-weight: 700;
}

.legal .updated {
  color: var(--ink-faint);
  font-size: 15px;
  margin: 0 0 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}

.legal h2 {
  font-size: clamp(22px, 3.2vw, 27px);
  margin: 44px 0 12px;
}

.legal h3 {
  font-family: var(--display);
  font-size: 19px;
  margin: 26px 0 8px;
}

.legal p, .legal li { color: var(--ink-muted); }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--ink); }

.callout {
  background: var(--butter);
  border-left: 3px solid var(--citrus);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout p { margin: 0; }

.todo {
  background: var(--gain-light);
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 3px 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding-block: 48px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--primary);
  margin: 0 0 8px;
}

.footer-tag { margin: 0; color: var(--ink-muted); font-size: 15px; }

footer nav { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
footer nav a { color: var(--ink-muted); text-decoration: none; }
footer nav a:hover { color: var(--primary); }

.colophon {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  font-size: 14px;
  color: var(--ink-faint);
}

.colophon p { margin: 0 0 6px; }

.disclaimer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-faint);
  max-width: 80ch;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .masthead .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .masthead nav { gap: 18px; flex-wrap: wrap; }
  body { font-size: 16px; }
}
