/* Bill Fix — marketing site styles. Self-contained, no external fonts or CDNs
   so it loads fast and hosts anywhere for free. Palette + radii mirror the app
   (see app/lib/core/theme/design_tokens.dart). */

:root {
  --bg: #F6F6F4;
  --card: #FFFFFF;
  --text: #1A1A18;
  --text-2: #66665F;
  --muted: #9A9A91;
  --border: rgba(20, 20, 15, 0.10);
  --border-strong: rgba(20, 20, 15, 0.18);
  --teal: #0A7A63;
  --teal-2: #2E9C82;
  --on-teal: #FFFFFF;
  --accent-bg: #E3F5F0;
  --accent-text: #0A7A63;
  --success-bg: #E7F5EA;
  --success-text: #1F7A3D;
  --danger-bg: #FBEAEA;
  --danger-text: #A32D2D;
  --radius: 10px;
  --card-radius: 16px;
  --header-bg: rgba(246, 246, 244, 0.72);
  --shadow: 0 1px 2px rgba(20,20,15,0.04), 0 8px 24px rgba(20,20,15,0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171715;
    --card: #201F1D;
    --text: #F2F2EE;
    --text-2: #B7B6AE;
    --muted: #85847B;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.20);
    --teal: #35D6AC;
    --teal-2: #2FD9AE;
    --on-teal: #0B231D;
    --accent-bg: #10352C;
    --accent-text: #4FE0BC;
    --success-bg: #133821;
    --success-text: #5FD98A;
    --danger-bg: #3A1B1B;
    --danger-text: #E88;
    --header-bg: rgba(23, 23, 21, 0.72);
    --shadow: 0 1px 2px rgba(0,0,0,0.20), 0 8px 24px rgba(0,0,0,0.30);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: 720px; }

/* ---- brand mark ---- */
.mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 82%, #fff), var(--teal));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--teal) 35%, transparent);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.mark svg { width: 18px; height: 18px; }
.mark path { stroke: var(--on-teal); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }

/* ---- header ---- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
header.site .row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
header.site nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
header.site nav a:not(.btn) { color: var(--text-2); font-size: 15px; }
header.site nav a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; line-height: 1;
  padding: 12px 18px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 84%, #fff), var(--teal));
  color: var(--on-teal);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--teal) 28%, transparent);
}
.btn-primary:hover { text-decoration: none; filter: brightness(1.03); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { text-decoration: none; background: var(--card); }
.btn-lg { padding: 15px 24px; font-size: 16px; }

/* ---- hero ---- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-bg); color: var(--accent-text);
  font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
h1 { font-size: 46px; line-height: 1.08; letter-spacing: -0.02em; font-weight: 600; }
.hero p.lead { font-size: 19px; color: var(--text-2); margin: 18px 0 28px; max-width: 30ch; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---- phone preview card ---- */
.preview {
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); padding: 18px; max-width: 340px; margin: 0 auto; width: 100%;
}
.savings-card { border: 1px solid var(--border); border-radius: var(--card-radius); padding: 16px; background: var(--card); box-shadow: var(--shadow); }
.savings-card .label { font-size: 13px; color: var(--text-2); }
.savings-card .amount { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; margin: 2px 0 4px; }
.savings-card .sub { font-size: 13px; color: var(--muted); }
.line { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-top: 10px; }
.line .code { font-size: 14px; font-weight: 500; }
.line .desc { font-size: 12px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.pill.over { background: var(--success-bg); color: var(--success-text); }
.pill.dup { background: var(--danger-bg); color: var(--danger-text); }
.preview .unlock { margin-top: 14px; width: 100%; }

/* ---- sections ---- */
section { padding: 56px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }
.section-head p { color: var(--text-2); font-size: 17px; margin-top: 12px; }

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--card-radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card .ico {
  width: 42px; height: 42px; border-radius: 11px; background: var(--accent-bg); color: var(--accent-text);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.card .ico svg { width: 20px; height: 20px; }
.card h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.card p { color: var(--text-2); font-size: 15px; }
.step-n { font-size: 13px; font-weight: 600; color: var(--accent-text); }

/* pricing */
.price-rows { max-width: 560px; margin: 0 auto; }
.price-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.price-row:last-child { border-bottom: none; }
.price-row .k { font-size: 16px; }
.price-row .v { font-size: 16px; font-weight: 600; }
.price-row .v.free { color: var(--success-text); }

/* honesty band */
.band { background: var(--accent-bg); border-radius: var(--card-radius); padding: 32px; text-align: center; }
.band h2 { font-size: 26px; font-weight: 600; }
.band p { color: var(--text-2); max-width: 640px; margin: 12px auto 0; font-size: 16px; }

/* faq */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 16px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; font-weight: 500; font-size: 16px; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-2); font-size: 15px; padding: 0 0 16px; }

/* ---- learn page ---- */
.learn-toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.learn-toc a { background: var(--accent-bg); color: var(--accent-text); font-size: 14px; padding: 7px 14px; border-radius: 999px; }
.learn-toc a:hover { text-decoration: none; filter: brightness(0.97); }
.learn-cat > h2 { margin-top: 34px; }

/* ---- prose / legal ---- */
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: 34px; margin-bottom: 6px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 20px; font-weight: 600; margin: 30px 0 8px; }
.legal p { color: var(--text-2); margin-bottom: 12px; }
.legal ul { color: var(--text-2); margin: 0 0 12px 20px; }
.legal li { margin-bottom: 6px; }
.callout { background: var(--accent-bg); color: var(--accent-text); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; margin-bottom: 28px; }

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
footer.site .cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site nav a { color: var(--text-2); font-size: 14px; }
footer.site .fine { color: var(--muted); font-size: 13px; margin-top: 22px; max-width: 720px; }

/* ---- responsive ---- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero p.lead { max-width: none; }
  h1 { font-size: 38px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero .preview { order: -1; }
}
@media (max-width: 560px) {
  header.site nav { gap: 14px; }
  header.site nav a.hide-sm { display: none; }
  h1 { font-size: 32px; }
  .section-head h2 { font-size: 26px; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
