/* BillNest landing page. Statement paper, ink, goldfinch, ledger green. */
@font-face { font-family: 'Bitter'; src: url('/fonts/Bitter.woff') format('woff'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans.woff') format('woff'); font-weight: 100 1000; font-display: swap; }

:root {
  --paper: #F2F4F7;
  --sheet: #FFFFFF;
  --ink: #172033;
  --ink-soft: #4A5568;
  --rule: #D5DBE3;
  --envelope: #27406B;
  --gold: #E9A81F;
  --gold-deep: #C98A08;
  --green: #1E8A57;
  --late: #C2412D;
  --radius-s: 6px;
  --radius-m: 12px;
  --serif: 'Bitter', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --measure: 62ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--envelope); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0.5rem; background: var(--ink); color: #fff; padding: 0.5rem 1rem; border-radius: var(--radius-s); z-index: 10; }
.skip:focus { left: 0.5rem; }

h1, h2 { font-family: var(--serif); font-weight: 750; letter-spacing: -0.015em; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: 0.9rem; }
p { max-width: var(--measure); }
p + p { margin-top: 0.9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  padding: 0.95rem 1.4rem; border-radius: var(--radius-s); border: 2px solid transparent;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); }
.btn-ink { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { padding: 0.6rem 1.1rem; background: var(--ink); color: #fff; }
.btn-ghost:hover { background: var(--envelope); }
.btn-paper { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-paper:hover { background: #fff; color: var(--ink); }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 2rem;
  padding: 0.85rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font: 750 1.35rem/1 var(--serif); }
.brand img { border-radius: 9px; }
.top-nav { display: flex; gap: 1.6rem; margin-left: auto; }
.top-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.top-nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .top-nav { display: none; } .top .btn-ghost { margin-left: auto; } }

/* ---------- Layout ---------- */
main > section { padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 5vw, 4rem); }
main > section > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-lede { color: var(--ink-soft); font-size: 1.15rem; margin-bottom: 2.2rem; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
  max-width: 1280px; margin: 0 auto;
}
.hero > * { max-width: none; margin: 0; }
.lede { font-size: 1.25rem; color: var(--ink-soft); margin: 1.4rem 0 2rem; max-width: 48ch; }
.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.assurances { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.8rem; color: var(--ink-soft); font-size: 0.95rem; }
.assurances li { display: inline-flex; align-items: center; gap: 0.4rem; }
.assurances li::before { content: ""; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; flex: none; }

/* Bill stubs: the one bold element */
.stubs { position: relative; display: grid; gap: 1rem; }
.stubs-count { font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; }
.stubs-count span { font-family: var(--serif); color: var(--green); font-size: 1.2rem; }
.stub {
  position: relative; overflow: hidden;
  background: var(--sheet); border-radius: 4px;
  box-shadow: 0 1px 0 var(--rule), 0 10px 24px -14px rgba(23, 32, 51, 0.35);
  transition: transform 0.2s;
}
.stub:nth-of-type(1) { transform: rotate(-1.2deg); }
.stub:nth-of-type(2) { transform: rotate(0.8deg); margin-left: 1.5rem; }
.stub:nth-of-type(3) { transform: rotate(-0.5deg); margin-left: 0.6rem; }
/* perforated tear line */
.stub::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: radial-gradient(circle at 5px 6px, var(--paper) 3px, transparent 3.5px) 0 0/10px 6px repeat-x;
}
.stub-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.75rem 1.1rem;
  font: 700 1.1rem/1.2 var(--serif); color: #fff;
  /* security-envelope crosshatch */
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.07) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.07) 0 2px, transparent 2px 7px),
    var(--envelope);
}
.stub-acct { font: 500 0.8rem/1 var(--sans); opacity: 0.8; }
.stub-body { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: end; padding: 0.9rem 1.1rem 1.3rem; }
.stub-label { display: block; font-size: 0.78rem; color: var(--ink-soft); }
.stub-body strong { font: 700 1.3rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.stub-btn {
  font: 600 0.9rem/1 var(--sans); padding: 0.6rem 0.9rem; border-radius: var(--radius-s);
  border: 2px solid var(--green); background: #fff; color: var(--green); cursor: pointer;
}
.stub-btn:hover { background: var(--green); color: #fff; }
.stub.is-paid .stub-btn { visibility: hidden; }
.stub.is-paid .stub-body strong { color: var(--ink-soft); }
.stamp {
  position: absolute; right: 1.4rem; top: 50%;
  font: 800 2.1rem/1 var(--serif); letter-spacing: 0.08em;
  color: var(--green); border: 4px solid var(--green); border-radius: 8px; padding: 0.2rem 0.7rem;
  transform: translateY(-30%) rotate(-12deg) scale(1.6); opacity: 0; pointer-events: none;
  mix-blend-mode: multiply;
}
.stub.is-paid .stamp { opacity: 0.9; transform: translateY(-30%) rotate(-12deg) scale(1); transition: transform 0.22s cubic-bezier(.3,1.6,.5,1), opacity 0.12s; }
@media (prefers-reduced-motion: reduce) { .stub.is-paid .stamp { transition: none; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .stubs { max-width: 520px; }
}
@media (max-width: 480px) {
  .stub-body { grid-template-columns: 1fr 1fr; }
  .stub-btn { grid-column: 1 / -1; }
  .stub.is-paid .stub-btn { display: none; }
  .stub:nth-of-type(2), .stub:nth-of-type(3) { margin-left: 0; }
  .stamp { top: auto; bottom: 1.2rem; right: 0.9rem; font-size: 1.45rem; padding: 0.1rem 0.5rem; border-width: 3px; transform: rotate(-8deg) scale(1.6); }
  .stub.is-paid .stamp { transform: rotate(-8deg) scale(1); }
}

/* ---------- Screenshots ---------- */
.shot { border-radius: var(--radius-m); overflow: hidden; background: #0f172a; box-shadow: 0 24px 50px -28px rgba(23, 32, 51, 0.55), 0 0 0 1px rgba(23,32,51,0.08); }
.shot-browser .chrome { display: flex; align-items: center; gap: 0.4rem; padding: 0.6rem 0.9rem; background: #1e293b; }
.shot-browser .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #475569; }
.shot-browser .chrome span { margin-left: 0.8rem; font-size: 0.78rem; color: #94a3b8; background: #0f172a; padding: 0.2rem 0.8rem; border-radius: 999px; }

/* ---------- Glance ---------- */
.glance { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.glance-copy { margin-bottom: 2.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
.glance-copy h2 { grid-row: span 2; }
.glance-copy p { color: var(--ink-soft); }
.glance-copy p + p { margin-top: 0.9rem; }
.glance .shot { max-width: 1180px; }
@media (max-width: 820px) { .glance-copy { grid-template-columns: 1fr; } .glance-copy p + p { margin-top: 0.9rem; } }

/* ---------- Features: a statement of line items ---------- */
.statement { border-top: 3px solid var(--ink); }
.line {
  display: grid; grid-template-columns: minmax(10rem, 15rem) 1fr; gap: 1.5rem;
  padding: 1.15rem 0; border-bottom: 1px dashed var(--rule);
}
.line dt { font: 700 1.2rem/1.35 var(--serif); }
.line dd { color: var(--ink-soft); max-width: var(--measure); }
.features { padding-bottom: clamp(2rem, 4vw, 3rem) !important; }
@media (max-width: 640px) { .line { grid-template-columns: 1fr; gap: 0.25rem; } }

/* ---------- Income ---------- */
.income { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; max-width: 1280px; margin: 0 auto; }
.income > * { max-width: none; margin: 0; }
.income-copy p { color: var(--ink-soft); }
.income-copy strong { color: var(--ink); }
.income-shots { display: grid; gap: 1.2rem; }
@media (max-width: 900px) { .income { grid-template-columns: 1fr; } }

/* ---------- Calendar ---------- */
.calendar { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2.5rem; }
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 0.35rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.steps li::before { content: counter(step); font: 800 2rem/1 var(--serif); color: var(--gold-deep); }
.steps strong { font: 700 1.15rem/1.3 var(--serif); }
.steps span { color: var(--ink-soft); font-size: 0.98rem; }
.calendar-shots { display: grid; grid-template-columns: 1.6fr 0.75fr; gap: 1.2rem; align-items: start; }
.fine { margin-top: 1.6rem; color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 820px) { .steps, .calendar-shots { grid-template-columns: 1fr; } .shot-narrow { max-width: 420px; } }

/* ---------- Security ---------- */
.security {
  color: #fff;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 9px),
    var(--envelope);
}
.security-inner { max-width: 900px; }
.security h2 { margin-bottom: 1.8rem; }
.seals { list-style: none; display: grid; gap: 1.1rem; }
.seals li { padding-left: 1.6rem; position: relative; color: rgba(255,255,255,0.85); max-width: 70ch; }
.seals li::before { content: ""; position: absolute; left: 0; top: 0.5rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--gold); }
.seals strong { color: #fff; }

/* ---------- Phone ---------- */
.phone { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; max-width: 1000px; margin: 0 auto; }
.phone > * { max-width: none; margin: 0; }
.phone-frame { width: min(300px, 70vw); border: 10px solid var(--ink); border-radius: 36px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(23,32,51,0.6); background: var(--ink); }
.phone-frame img { border-radius: 26px; }
.phone-copy p { color: var(--ink-soft); }
@media (max-width: 720px) { .phone { grid-template-columns: 1fr; justify-items: center; text-align: center; } .phone-copy p { margin-left: auto; margin-right: auto; } }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative; font: 700 1.15rem/1.35 var(--serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.2rem; top: 0.95rem; font: 400 1.6rem/1 var(--sans); color: var(--ink-soft); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-soft); padding-bottom: 1.2rem; }

/* ---------- Closing + footer ---------- */
.closing { background: var(--ink); color: #fff; text-align: center; }
.closing h2 { margin-bottom: 1.6rem; }
.closing .cta-row { justify-content: center; }
.foot { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; padding: 1.8rem clamp(1.25rem, 5vw, 4rem); background: var(--ink); color: rgba(255,255,255,0.65); border-top: 1px solid rgba(255,255,255,0.12); font-size: 0.9rem; }
.foot .brand { color: #fff; font-size: 1.05rem; }
.foot .brand img { border-radius: 6px; }
.foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot a { color: rgba(255,255,255,0.8); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }

/* ---------- v3 sections: setup, history, reminders, reports, household ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split-rev .split-copy { order: 2; }
.split-copy p { color: var(--ink-soft); }
.stack { display: grid; gap: 1.2rem; }
.shot-narrow-r { max-width: 520px; justify-self: end; width: 100%; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split-rev .split-copy { order: 0; } .shot-narrow-r { justify-self: start; } }

.setup { background: var(--sheet); border-bottom: 1px solid var(--rule); }
.history { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.channels { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.channel h3 { font: 700 1.3rem/1.3 var(--serif); margin-bottom: 0.4rem; }
.channel p { color: var(--ink-soft); margin-bottom: 1rem; }
.channel .shot + .channel-sub { margin-top: 2rem; }
.shot-light { background: var(--paper); }
.channel:first-child .shot { max-width: 460px; }
@media (max-width: 900px) { .channels { grid-template-columns: 1fr; } }

.reports { background: var(--sheet); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; }
.report-card .shot { max-height: 460px; }
.report-card .shot img { object-fit: cover; object-position: top; width: 100%; }
.report-card figcaption { margin-top: 0.9rem; color: var(--ink-soft); max-width: 56ch; }
.report-card figcaption strong { display: block; color: var(--ink); font: 700 1.15rem/1.35 var(--serif); margin-bottom: 0.15rem; }
.report-more { margin-top: 2rem; color: var(--ink-soft); }
@media (max-width: 760px) { .report-grid { grid-template-columns: 1fr; } }

.household { text-align: left; }
.household-inner { max-width: 820px; border-left: 4px solid var(--gold); padding-left: clamp(1rem, 3vw, 2rem); }
.household-inner p { color: var(--ink-soft); }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-top: 1.2rem; font-weight: 600; }
.ticks li { display: inline-flex; align-items: center; gap: 0.45rem; }
.ticks li::before { content: ""; width: 0.95rem; height: 0.95rem; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/80% no-repeat; flex: none; }
