/* ==========================================================================
   homebook — landing page
   Editorial, household-oriented, human. Mobile-first; desktop is a refinement.
   ========================================================================== */

:root {
  /* Brand tokens — kept in sync with the app's CSS variables. The marketing
     register is a touch warmer in paper tone; everything else matches. */
  --paper:        #fbf7f1;   /* warm cream, slightly more saturated than app */
  --paper-2:      #f3ede2;
  --paper-3:      #e8dfcd;
  --card:         #ffffff;
  --rule:         rgba(40, 30, 20, 0.12);
  --rule-soft:    rgba(40, 30, 20, 0.06);
  --rule-strong:  rgba(40, 30, 20, 0.45);

  --ink:          #1a1410;
  --ink-2:        #3a3228;
  --ink-3:        #6e6256;
  --ink-4:        #a8a094;

  --terracotta:      #e2552a;
  --terracotta-soft: #ee8868;
  --pos:             #1f9d4d;
  --neg:             #e2552a;
  --ochre:           #d99319;

  /* Tag colors — same hex values used in the app. */
  --moss:        #5fa83a;
  --teal:        #1ea69e;
  --slate:       #4f74d6;
  --plum:        #a64ad9;
  --rose:        #e64a7a;
  --sand:        #c89858;

  --font-display: "Fraunces", "EB Garamond", "Iowan Old Style", Georgia, serif;
  --font-ui:      "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;     /* iOS Safari guard */
}

a { color: inherit; }
button { font-family: inherit; }

/* ──────────────────────────────────────────────────────────────────────────
   Typography primitives
   ────────────────────────────────────────────────────────────────────────── */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.display.italic { font-style: italic; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow.soft {
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-ui);
  font-weight: 500;
}

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

.muted { color: var(--ink-3); }
.dim   { color: var(--ink-4); }

/* The wordmark — always lowercase, italic Fraunces. */
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────────────────
   Topbar — quiet, sticky, with a single CTA
   ────────────────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 247, 241, 0.86);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 0.5px solid var(--rule-soft);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar-cta {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.005em;
  transition: background 0.15s, transform 0.1s;
}
.topbar-cta:hover { background: var(--ink-2); }
.topbar-cta:active { transform: translateY(1px); }

/* ──────────────────────────────────────────────────────────────────────────
   Section shell — generous editorial rhythm. Mobile first.
   ────────────────────────────────────────────────────────────────────────── */

.section {
  padding: 56px 20px;
  max-width: 100%;
}
.section-inner {
  max-width: 720px;
  margin: 0 auto;
}
.section-inner.wide {
  max-width: 1120px;
}
@media (min-width: 1280px) {
  .section-inner.wide { max-width: 1240px; }
}
@media (min-width: 1440px) {
  .section-inner.wide { max-width: 1360px; }
}
@media (min-width: 1680px) {
  .section-inner.wide { max-width: 1480px; }
}
.section.tight   { padding: 36px 20px; }
.section.spacious { padding: 80px 20px 64px; }

@media (min-width: 768px) {
  .section          { padding: 96px 32px; }
  .section.tight    { padding: 56px 32px; }
  .section.spacious { padding: 128px 32px 96px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Hero
   ────────────────────────────────────────────────────────────────────────── */

.hero-section {
  padding: 36px 20px 56px;
}
@media (min-width: 768px) {
  .hero-section { padding: 64px 32px 96px; }
}

.hero-eyebrow {
  margin-bottom: 18px;
}
.hero-eyebrow .eyebrow-dot {
  color: var(--ink-4);
  margin: 0 4px;
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 8vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 22ch;
}
.hero-headline em {
  font-style: italic;
  color: var(--teal);
}
.hero-subhead {
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 48ch;
  margin: 0 0 28px;
}
.hero-cta-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.btn-primary {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.005em;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--ink-2); }
.btn-primary:active { transform: translateY(1px); }
.btn-quiet {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 8px;
  cursor: pointer;
}
.btn-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ──────────────────────────────────────────────────────────────────────────
   Hero mini-demo — interactive "remaining this month"
   ────────────────────────────────────────────────────────────────────────── */

.hero-demo {
  background: var(--card);
  border: 0.5px solid var(--rule);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: 0 1px 0 rgba(40, 30, 20, 0.04), 0 8px 28px rgba(40, 30, 20, 0.06);
  max-width: 480px;
}
.hero-demo-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.hero-demo-amount {
  font-family: var(--font-display);
  font-size: 48px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 14px;
  transition: color 0.2s;
}
.hero-demo-amount.dropping { color: var(--terracotta); }
.hero-demo-amount .sign {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--ink-3);
  margin-right: 4px;
  vertical-align: 4px;
}
.hero-demo-amount .cents {
  font-size: 18px;
  color: var(--ink-3);
  margin-left: 3px;
  vertical-align: 8px;
}

.hero-demo-status {
  font-size: 11px;
  color: var(--pos);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-demo-status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pos);
}

.hero-demo-list {
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 0.5px solid var(--rule-soft);
}
.hero-demo-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--rule-soft);
  font-size: 13px;
  animation: row-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero-demo-row.removing {
  animation: row-out 0.22s ease forwards;
}
@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes row-out {
  to { opacity: 0; transform: translateX(20px); height: 0; padding: 0; border: 0; margin: 0; }
}
.hero-demo-row .merchant {
  font-weight: 500;
  color: var(--ink);
}
.hero-demo-row .meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-demo-row .amt {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.hero-demo-row .amt::before { content: '−'; opacity: 0.55; margin-right: 1px; }

/* Hero footer row — quiet hint + the action button that opens the sheet. */
.hero-demo-foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 10px;
}
.hero-demo-add-btn {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
}
.hero-demo-add-btn:hover  { background: var(--ink-2); }
.hero-demo-add-btn:active { transform: translateY(1px); }

/* ExpenseSheet — mirrors the real ExpenseModal: amount-prominent header,
   merchant + tag picker, sticky-feeling footer with cancel + primary action.
   Lives inside the hero card so it's visually a "sheet within the dashboard." */
.expense-sheet {
  margin-top: 14px;
  padding-top: 6px;
  border-top: 0.5px solid var(--rule-soft);
  animation: sheet-up 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes sheet-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.expense-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-4);
  opacity: 0.45;
  margin: 0 auto 12px;
}
.expense-sheet-head {
  margin-bottom: 14px;
}
.expense-sheet-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.expense-sheet-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.expense-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.expense-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.expense-field-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.expense-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: 4px;
  border: 0.5px solid var(--rule);
  background: var(--paper-2);
  border-radius: 8px;
  padding: 10px 12px;
  transition: border-color 0.15s;
}
.expense-amount-wrap:focus-within { border-color: var(--terracotta); }
.expense-amount-prefix {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink-3);
}
.expense-amount-input {
  appearance: none;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.015em;
  color: var(--ink);
  width: 100%;
  min-width: 0;
  padding: 0;
}
.expense-amount-input::placeholder { color: var(--ink-4); }
.expense-text-input {
  appearance: none;
  border: 0.5px solid var(--rule);
  background: var(--paper-2);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.expense-text-input:focus { border-color: var(--terracotta); }
.expense-text-input::placeholder { color: var(--ink-4); }
.expense-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.expense-tag {
  appearance: none;
  border: 0.5px solid;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0.65;
}
.expense-tag.selected { opacity: 1; outline: 1px solid currentColor; outline-offset: 1px; }
.expense-tag:hover    { opacity: 0.95; }
.expense-sheet-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 0.5px solid var(--rule-soft);
}
.expense-cancel {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
}
.expense-cancel:hover { color: var(--ink); background: var(--paper-2); }
.expense-submit {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.expense-submit:hover     { background: var(--ink-2); }
.expense-submit:active    { transform: translateY(1px); }
.expense-submit:disabled  { background: var(--ink-4); cursor: not-allowed; }

/* Hero layout — single column at all sizes; the hero is pure vision now,
   no interactive demo competing for attention. Tools live in the vignettes. */
.hero-text {
  max-width: 720px;
}
@media (min-width: 1024px) {
  .hero-headline { font-size: clamp(40px, 5.4vw, 60px); }
}

/* ──────────────────────────────────────────────────────────────────────────
   Rejection paragraph
   ────────────────────────────────────────────────────────────────────────── */

.rejection {
  background: var(--paper-2);
  border-top: 0.5px solid var(--rule-soft);
  border-bottom: 0.5px solid var(--rule-soft);
  padding: 36px 20px;
}
.rejection-inner {
  max-width: 640px;
  margin: 0 auto;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.rejection-inner p {
  margin: 0 0 18px;
}
.rejection-inner p:last-child {
  margin-bottom: 0;
}
.rejection-inner em {
  font-style: italic;
  color: var(--ink);
}
/* Second paragraph: the meeting concept gets the brand accent. */
.rejection-inner p:last-child em {
  color: var(--terracotta);
}
@media (min-width: 768px) {
  .rejection { padding: 64px 32px; }
}

/* ──────────────────────────────────────────────────────────────────────────
   What homebook holds — the "table of contents" between problem and
   discovery. Four cards, each clickable to expand a short feature list.
   ────────────────────────────────────────────────────────────────────────── */

.holds-section {
  padding: 56px 20px 40px;
}
@media (min-width: 768px) {
  .holds-section { padding: 96px 32px 64px; }
}
.holds-head {
  text-align: center;
  margin-bottom: 36px;
}
.holds-head .eyebrow { display: block; margin-bottom: 14px; }
.holds-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}
.holds-head h2 em {
  font-style: italic;
  color: var(--terracotta);
}
@media (min-width: 768px) {
  .holds-head { margin-bottom: 56px; }
}

.holds-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 768px) {
  .holds-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

.holds-card {
  appearance: none;
  text-align: left;
  background: var(--card);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
/* Thin top accent rule that picks up the per-domain color. */
.holds-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.55;
  transition: opacity 0.18s, height 0.18s;
}
.holds-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(40, 30, 20, 0.06);
}
.holds-card:hover::before { opacity: 1; height: 3px; }
.holds-card.open {
  border-color: currentColor;
}
.holds-card.open::before { opacity: 1; height: 3px; }

/* Per-domain accent — the card's `currentColor` is set here so the top rule,
   the glyph, and the toggle all pick it up. */
.holds-card[data-accent="ochre"] { color: var(--ochre); }
.holds-card[data-accent="pos"]   { color: var(--pos); }
.holds-card[data-accent="moss"]  { color: var(--moss); }
.holds-card[data-accent="plum"]  { color: var(--plum); }

.holds-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.holds-glyph {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: currentColor;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, currentColor 12%, transparent);
  border-radius: 8px;
}
.holds-name {
  flex: 1;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.holds-toggle {
  font-family: var(--font-mono);
  font-size: 18px;
  color: currentColor;
  font-weight: 500;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in oklab, currentColor 10%, transparent);
  transition: transform 0.18s;
}
.holds-card.open .holds-toggle { transform: rotate(180deg); }

.holds-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.holds-details {
  margin: 4px 0 0;
  padding: 14px 0 2px;
  list-style: none;
  border-top: 0.5px dashed var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: holds-expand 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}
.holds-details li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  padding-left: 18px;
  position: relative;
}
.holds-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
@keyframes holds-expand {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* ──────────────────────────────────────────────────────────────────────────
   Vignettes
   ────────────────────────────────────────────────────────────────────────── */

.vignettes-head {
  text-align: center;
  margin-bottom: 48px;
}
.vignettes-head .eyebrow { display: block; margin-bottom: 14px; }
.vignettes-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}
.vignettes-head h2 em { color: var(--terracotta); font-style: italic; }

.vignette {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding: 36px 0;
  border-top: 0.5px solid var(--rule-soft);
  align-items: center;
}
.vignette:first-of-type { border-top: 0; }

@media (min-width: 768px) {
  .vignette {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    padding: 56px 0;
  }
  .vignette.flip > .vignette-text  { order: 2; }
  .vignette.flip > .vignette-visual { order: 1; }
}
/* Desktop vignettes get a wider container, an asymmetric grid that gives
   the visual side more breathing room, and a bigger phone frame so the
   embedded screen reads at a comfortable size. The text column stays at
   editorial reading width (~50–60 chars) while the device gets to feel
   like a hero object. */
@media (min-width: 1024px) {
  .vignette {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 72px;
    padding: 72px 0;
    align-items: center;
  }
  .vignette-text { max-width: 460px; }
  .vignette.flip .vignette-text { margin-left: auto; }
}

.vignette-eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--terracotta);   /* default; overridden by [data-accent] below */
  margin-bottom: 12px;
}
.vignette-text h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  font-weight: 500;
  color: var(--ink);
}
.vignette-text p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 12px;
}
.vignette-text p:last-child { margin-bottom: 0; }
.vignette-text em { font-style: italic; color: var(--terracotta); }

/* Per-vignette color motif — the page walks through the warm/earthy palette
   as you scroll: moss for meals, slate for income, ochre for daily spend,
   rose for the recurring schedule. */
.vignette[data-accent="moss"]  .vignette-eyebrow,
.vignette[data-accent="moss"]  .vignette-text em       { color: var(--moss); }
.vignette[data-accent="slate"] .vignette-eyebrow,
.vignette[data-accent="slate"] .vignette-text em       { color: var(--slate); }
.vignette[data-accent="ochre"] .vignette-eyebrow,
.vignette[data-accent="ochre"] .vignette-text em       { color: var(--ochre); }
.vignette[data-accent="rose"]  .vignette-eyebrow,
.vignette[data-accent="rose"]  .vignette-text em       { color: var(--rose); }

/* PhoneFrame — curved-screen wrapper that iframes a real app screen.
   Editorial register: not a glossy iPhone mockup with chrome bezels, just a
   calm rounded "device window" with a soft shadow and a subtle notch hint. */
.phone-frame {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 19.5;
  background: var(--ink);   /* default; per-vignette accents override below */
  border-radius: 36px;
  padding: 8px;
  box-shadow:
    0 18px 50px rgba(40, 30, 20, 0.18),
    0 4px 14px rgba(40, 30, 20, 0.08),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.05);
  margin: 0 auto;
  position: relative;
  transition: background 0.2s;
}
/* Per-vignette frame color — picks up the section's brand color so the
   phone bezel reads as "this is the meals/money/expenses/recurring area"
   even before the visitor reads the iframe content. */
.phone-frame[data-accent="moss"]  { background: var(--moss); }
.phone-frame[data-accent="slate"] { background: var(--slate); }
.phone-frame[data-accent="ochre"] { background: var(--ochre); }
.phone-frame[data-accent="rose"]  { background: var(--rose); }
.phone-frame[data-accent="plum"]  { background: var(--plum); }
.phone-frame[data-accent="teal"]  { background: var(--teal); }
.phone-frame[data-accent="terracotta"] { background: var(--terracotta); }

.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 3px;
  z-index: 2;
  pointer-events: none;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.phone-screen iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--card);
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.phone-frame.loaded .phone-screen iframe { opacity: 1; }

/* Fallback layer — sits behind the iframe (z-index: 1), shows a screenshot
   if the PNG exists, otherwise a calm skeleton. The iframe fades in over
   the top once it loads. */
.phone-fallback-img,
.phone-fallback-skel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.phone-fallback-img {
  object-fit: cover;
  object-position: top center;
  display: block;
}
.phone-fallback-skel {
  background: var(--card);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone-skel-eyebrow,
.phone-skel-title,
.phone-skel-line {
  background: linear-gradient(
    90deg,
    var(--paper-2) 0%,
    var(--paper-3) 50%,
    var(--paper-2) 100%
  );
  background-size: 200% 100%;
  animation: phone-skel-shimmer 1.6s ease-in-out infinite;
  border-radius: 4px;
}
.phone-skel-eyebrow { height: 8px; width: 32%; margin-bottom: 6px; }
.phone-skel-title   { height: 22px; width: 64%; margin-bottom: 14px; }
.phone-skel-line    { height: 12px; }
@keyframes phone-skel-shimmer {
  from { background-position:  200% 0; }
  to   { background-position: -200% 0; }
}

/* Desktop: drop the strict phone aspect ratio so the device flexes wider
   as the column allows without growing taller. Height stays bounded; width
   fills the visual column up to a generous cap. The bezel reads as a
   "device window" rather than a fixed phone — which suits the way magazine
   spreads handle large product shots. */
@media (min-width: 1024px) {
  .phone-frame {
    aspect-ratio: auto;
    max-width: 560px;
    width: 100%;
    height: 720px;
    border-radius: 42px;
    padding: 10px;
  }
  .phone-screen { border-radius: 32px; }
  .phone-notch { width: 76px; height: 6px; top: 16px; }
}
@media (min-width: 1280px) {
  .phone-frame {
    max-width: 640px;
    height: 760px;
    border-radius: 46px;
    padding: 11px;
  }
  .phone-screen { border-radius: 35px; }
}
@media (min-width: 1440px) {
  .phone-frame {
    max-width: 720px;
    height: 780px;
  }
}

/* Mobile vignettes — the phone frame sits inside an already-narrow column;
   keep it modest so it doesn't dominate. */
@media (max-width: 767px) {
  .phone-frame { max-width: 280px; }
}

/* Vignette visual cards — the small mock UI moments */
.v-card {
  background: var(--card);
  border: 0.5px solid var(--rule);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 0 rgba(40, 30, 20, 0.04), 0 6px 20px rgba(40, 30, 20, 0.05);
}
.v-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--rule-soft);
}
.v-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* Meals planner — date × meal-type cells (mirrors the real meal planner UI:
   each cell is one day's slot, tap to assign a recipe via the picker). */
.meal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.meal-cell {
  position: relative;
  border: 0.5px solid var(--rule);
  background: var(--paper-2);
  border-radius: 8px;
  padding: 10px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  min-height: 84px;
  transition: border-color 0.15s, background 0.15s;
}
.meal-cell.filled { background: color-mix(in oklab, var(--moss) 8%, var(--card)); border-color: color-mix(in oklab, var(--moss) 30%, var(--rule)); }
.meal-cell.picking { border-color: var(--moss); background: var(--card); }
.meal-cell-day {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.meal-cell-recipe {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  padding: 4px 4px;
  text-align: center;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}
.meal-cell-recipe:hover { color: var(--moss); }
.meal-cell-empty {
  appearance: none;
  border: 1px dashed var(--rule);
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.meal-cell-empty:hover { color: var(--moss); border-color: var(--moss); }

/* Recipe picker — pops out below the cell when a day is being assigned */
.meal-picker {
  position: absolute;
  top: calc(100% + 4px);
  left: -1px;
  right: -1px;
  background: var(--card);
  border: 0.5px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(40, 30, 20, 0.12);
  padding: 4px;
  z-index: 10;
  animation: picker-in 0.15s ease;
}
@keyframes picker-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.meal-picker-row {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 12.5px;
  text-align: left;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: block;
  width: 100%;
}
.meal-picker-row:hover    { background: var(--paper-2); }
.meal-picker-row.current  { background: color-mix(in oklab, var(--moss) 14%, transparent); color: var(--moss); font-weight: 500; }
.meal-picker-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  border-top: 0.5px solid var(--rule-soft);
  margin-top: 2px;
}
.meal-picker-clear:hover { color: var(--neg); }

.meal-shopping-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  margin-top: 4px;
}
.meal-shopping {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.meal-shopping-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--rule-soft);
  font-size: 13px;
}
.meal-shopping-row:last-child { border-bottom: 0; }
.meal-shopping-row .name { color: var(--ink-2); }
.meal-shopping-row .recipes {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 2px;
  font-family: var(--font-mono);
}
.meal-shopping-row .qty {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
}
.meal-shopping-empty {
  padding: 20px 8px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  font-style: italic;
}
.meal-shopping-pantry {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px dashed var(--rule);
  font-family: var(--font-mono);
}

/* Income card — confirmed vs projected */
.income-mock {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.income-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--rule-soft);
  align-items: center;
}
.income-row:last-of-type { border-bottom: 0; }
.income-row .name { font-size: 14px; color: var(--ink); font-weight: 500; }
.income-row .meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.income-row .amt {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--pos);
}
.income-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--pos) 14%, transparent);
  color: var(--pos);
  margin-right: 6px;
  vertical-align: 1px;
}
.income-pill.dim {
  background: color-mix(in oklab, var(--ochre) 14%, transparent);
  color: var(--ochre);
}
.income-row .amt.projected { color: var(--ochre); }

/* Fixed costs schedule row — matches the real FixedScreen layout exactly:
   [day] [name (+ optional LOAN badge)] / [tag · frequency] [amount + suffix]
   Followed by a Total row with a hard ink top border. */
.fixed-mock {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fixed-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--rule-soft);
  align-items: center;
  font-size: 13.5px;
}
.fixed-row:last-child { border-bottom: 0; }
.fixed-row .day {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.fixed-row .name {
  color: var(--ink);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fixed-row .meta {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fixed-row .amt {
  font-family: var(--font-mono);
  color: var(--ink-2);
}
.fixed-row .amt::before { content: '−'; opacity: 0.55; margin-right: 1px; }
.fixed-row.total {
  border-top: 1px solid var(--ink);
  border-bottom: 0;
  margin-top: 6px;
  padding-top: 12px;
}
.fixed-row.total .name { font-weight: 600; }
.fixed-row.total .amt { font-size: 14px; font-weight: 600; color: var(--ink); }

/* Inline tag pill on the schedule row (matches the in-app .tag styling) */
.fixed-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  border: 0.5px solid;
  letter-spacing: 0;
}

/* LOAN badge on a fixed cost row — same terracotta micro-tint as the app */
.fixed-loan-badge {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  background: color-mix(in oklab, var(--terracotta) 12%, transparent);
  border-radius: 3px;
}

/* ──────────────────────────────────────────────────────────────────────────
   Loan demo — the showcase interactive
   ────────────────────────────────────────────────────────────────────────── */

.showcase {
  background: var(--paper-2);
  border-top: 0.5px solid var(--rule-soft);
  border-bottom: 0.5px solid var(--rule-soft);
  padding: 56px 20px;
}
@media (min-width: 768px) {
  .showcase { padding: 96px 32px; }
}
.showcase-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 36px;
}
.showcase-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 14px 0 14px;
  font-weight: 400;
}
.showcase-head h2 em { font-style: italic; color: var(--terracotta); }
.showcase-head p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

.loan-card {
  background: var(--card);
  border: 0.5px solid var(--rule);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 1px 0 rgba(40, 30, 20, 0.04), 0 8px 28px rgba(40, 30, 20, 0.06);
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.loan-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.loan-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.loan-card-type {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}
.loan-card-balance {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}
.loan-card-balance-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 8vw, 44px);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.loan-card-balance-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.loan-card-consequence {
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.5;
  padding: 10px 14px;
  background: var(--paper-2);
  border-radius: 8px;
  border-left: 2px solid var(--terracotta);
}
.loan-card-consequence strong { color: var(--ink); font-weight: 600; }
.loan-card-projection {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.55;
}
.loan-card-projection strong { color: var(--ink); font-weight: 600; }
.loan-what-if {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 0.5px dashed var(--rule);
}
.loan-what-if-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.loan-what-if-amt {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--terracotta);
  font-weight: 500;
}
.loan-what-if-result {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 10px;
  line-height: 1.55;
  min-height: 36px;
}
.loan-what-if-result strong { color: var(--ink); font-weight: 600; }
.loan-what-if-result.dim { color: var(--ink-3); font-style: italic; }
.loan-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--paper-3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.loan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--terracotta);
  cursor: pointer;
  border: 3px solid var(--card);
  box-shadow: 0 1px 4px rgba(40, 30, 20, 0.2);
}
.loan-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--terracotta);
  cursor: pointer;
  border: 3px solid var(--card);
  box-shadow: 0 1px 4px rgba(40, 30, 20, 0.2);
}

/* ──────────────────────────────────────────────────────────────────────────
   Opinionated callouts — the design philosophy
   ────────────────────────────────────────────────────────────────────────── */

.callouts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 36px;
}
@media (min-width: 768px) {
  .callouts { grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
}
.callout {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}
.callout h4 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 10px;
}
.callout h4 em { font-style: italic; color: var(--terracotta); }

/* Per-callout color motif — three different brand colors so the row of three
   reads as a thematic sweep, not a triple shout of the same accent. */
.callout.accent-moss   { border-top-color: var(--moss); }
.callout.accent-moss   h4 em { color: var(--moss); }
.callout.accent-slate  { border-top-color: var(--slate); }
.callout.accent-slate  h4 em { color: var(--slate); }
.callout.accent-plum   { border-top-color: var(--plum); }
.callout.accent-plum   h4 em { color: var(--plum); }
.callout p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* ──────────────────────────────────────────────────────────────────────────
   Who it's for, pricing, build story, final CTA
   ────────────────────────────────────────────────────────────────────────── */

.audience {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 20px;
}
@media (min-width: 768px) { .audience { padding: 96px 32px; } }
.audience-inner {
  max-width: 720px;
  margin: 0 auto;
}
.audience .eyebrow { color: var(--paper-3); margin-bottom: 18px; display: block; }
.audience p {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--paper);
  margin: 0;
  font-weight: 400;
}
.audience p em { font-style: italic; color: var(--ochre); }

.pricing-block {
  text-align: center;
}
.pricing-amount {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 56px);
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin: 14px 0 16px;
  font-weight: 400;
}
.pricing-amount em { font-style: italic; color: var(--pos); }
.pricing-line {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: var(--ink-2);
  max-width: 38ch;
  margin: 0 auto;
  line-height: 1.5;
}
.pricing-demo {
  font-family: var(--font-ui);
  font-size: 13.5px;
  color: var(--ink-3);
  margin: 24px auto 0;
  padding-top: 18px;
  border-top: 0.5px solid var(--rule-soft);
  max-width: 38ch;
  line-height: 1.5;
}
.pricing-demo em {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-2);
  font-size: 15px;
}
.pricing-demo-link {
  color: var(--teal);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 0.5px solid color-mix(in oklab, var(--teal) 35%, transparent);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.pricing-demo-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.build-story {
  background: var(--paper-2);
  padding: 56px 20px;
}
@media (min-width: 768px) { .build-story { padding: 96px 32px; } }
.build-story-inner {
  max-width: 600px;
  margin: 0 auto;
}
.build-story-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--terracotta);
  margin-bottom: 14px;
}
.build-story-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.6vw, 22px);
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: -0.005em;
}
.build-story-text:last-child { margin-bottom: 0; }
.build-story-text em { font-style: italic; color: var(--terracotta); }
.build-story-text em.ochre { color: var(--ochre); }
.build-story-text em.slate { color: var(--slate); }
.build-story-sig {
  margin-top: 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--ink-2);
}

.final-cta {
  text-align: center;
  padding: 80px 20px 96px;
}
@media (min-width: 768px) { .final-cta { padding: 128px 32px 112px; } }
.final-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
  font-weight: 400;
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
}
.final-cta h2 em { font-style: italic; color: var(--terracotta); }
.final-cta .btn-primary { font-size: 16px; padding: 16px 28px; }

/* ──────────────────────────────────────────────────────────────────────────
   Footer
   ────────────────────────────────────────────────────────────────────────── */

.foot {
  border-top: 0.5px solid var(--rule-soft);
  padding: 36px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-3);
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.foot-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: -0.005em;
}
.foot-links {
  display: flex;
  gap: 18px;
}
.foot-links a {
  color: var(--ink-3);
  text-decoration: none;
}
.foot-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ──────────────────────────────────────────────────────────────────────────
   Touch + safe-area niceties
   ────────────────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .btn-primary { width: 100%; justify-content: center; }
  .topbar-cta { padding: 7px 12px; font-size: 12px; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-cta-row .btn-quiet { text-align: center; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: env(safe-area-inset-bottom); }
}
