/* SpendWise: Expense Tracker — website design system.
   Premium monochrome fintech, matching the app: black ground, white text,
   soft gray secondary, hairline borders, subtle green (positive/premium) and
   red (expense) semantic accents only. No purple/blue, no loud gradients. */

:root {
  --bg: #000000;
  --surface: #0d0d0f;
  --surface-2: #16161a;
  --glass: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.25);
  --text: #ffffff;
  --text-2: #b6b6bc;
  --text-3: #77777e;
  --green: #34d399;
  --red: #f87171;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --maxw: 1120px;
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
p { margin: 0 0 1em; color: var(--text-2); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.green { color: var(--green); }
.red { color: var(--red); }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 14px;
}

/* ---- Skip link + focus ---- */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: #fff; color: #000; padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 700;
}
.skip:focus { left: 0; }
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px;
}

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.01em; }
.brand .logo {
  width: 32px; height: 32px; border-radius: 9px; background: #fff; padding: 4px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.brand .logo img { width: 100%; height: 100%; }
.brand b { font-size: 1.02rem; }
.brand span { color: var(--text-3); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 0.95rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: var(--glass); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--border); color: var(--text);
  width: 42px; height: 42px; border-radius: 11px; cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(0, 0, 0, 0.96); border-bottom: 1px solid var(--border); padding: 12px 16px 18px;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 12px; font-size: 1rem; }
  .nav-cta { margin: 6px 0 0; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 13px; font-weight: 700; font-size: 0.98rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  min-height: 46px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #eaeaea; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--glass); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; min-height: 40px; font-size: 0.9rem; }

/* ---- Sections ---- */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-2); max-width: 44ch; }
.section-head { max-width: 62ch; margin: 0 auto 44px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---- Cards / grid ---- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.card.hi { background: var(--surface-2); }
a.card:hover, .card.interactive:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.icon-badge {
  width: 46px; height: 46px; border-radius: 13px; background: var(--glass);
  border: 1px solid var(--border); display: grid; place-items: center; margin-bottom: 16px; color: var(--text);
}
.icon-badge svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; font-size: 0.96rem; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; border: 1px solid var(--border);
  background: var(--glass); color: var(--text-2);
}
.pill.green { color: var(--green); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.12); }

/* ---- Hero ---- */
.hero { padding-top: clamp(48px, 8vw, 84px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; text-align: center; } .hero .lead { margin-inline: auto; } }
.hero h1 { margin-bottom: 18px; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 940px) { .hero-cta { justify-content: center; } }
.hero-note { margin-top: 16px; font-size: 0.85rem; color: var(--text-3); }

/* ---- Phone mockup (pure CSS, app visual language) ---- */
.phone-wrap { display: flex; justify-content: center; }
.phone {
  width: 300px; max-width: 82vw; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #1b1b1f, #0a0a0c);
  border: 1px solid var(--border-strong); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.phone-screen {
  background: #000; border-radius: 32px; overflow: hidden; border: 1px solid var(--border);
  padding: 16px 14px 18px; min-height: 560px;
}
.status { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; color: var(--text-2); padding: 4px 6px 12px; }

.app-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; padding: 14px; }
.app-card + .app-card { margin-top: 10px; }
.overline { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); }
.balance { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.trend { font-size: 0.68rem; font-weight: 700; color: var(--green); background: rgba(52,211,153,0.14); padding: 3px 8px; border-radius: 999px; }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 46px; margin: 12px 0 4px; }
.bars i { flex: 1; background: rgba(255,255,255,0.16); border-radius: 4px; }
.bars i.hot { background: #fff; }
.mini-tiles { display: flex; gap: 8px; margin-top: 10px; }
.mini-tile { flex: 1; background: var(--glass); border: 1px solid var(--border); border-radius: 11px; padding: 8px 10px; }
.mini-tile b { font-size: 0.72rem; }
.mini-tile span { display: block; font-size: 0.62rem; color: var(--text-3); }
.row { display: flex; align-items: center; gap: 10px; }
.row + .row { margin-top: 10px; }
.dot { width: 30px; height: 30px; border-radius: 50%; background: var(--glass); border: 1px solid var(--border); flex: 0 0 auto; }
.row .grow { flex: 1; min-width: 0; }
.row .t { display: block; font-size: 0.8rem; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { display: block; font-size: 0.64rem; color: var(--text-3); line-height: 1.2; }
.amt { font-size: 0.82rem; font-weight: 700; }
.track { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 6px; }
.track i { display: block; height: 100%; background: #fff; border-radius: 4px; }
.arrow { color: var(--text-2); font-size: 1.1rem; padding: 0 2px; }
.scan-flow { display: flex; align-items: stretch; gap: 8px; }
.scan-flow .app-card { flex: 1; margin: 0; }
.tx-line { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-2); margin-top: 4px; }
.tx-line.total { color: #fff; font-weight: 700; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 6px; }

/* ---- Comparison table ---- */
.compare { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--border); font-size: 0.95rem; vertical-align: middle; }
.compare thead th { font-size: 0.8rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); background: var(--surface-2); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 22%; }
.compare tr:last-child td { border-bottom: none; }
.compare .yes { color: var(--green); font-weight: 700; }
.compare .lim { color: var(--text-2); }
.compare .no { color: var(--text-3); }
.compare td:first-child { color: var(--text); font-weight: 600; }
.compare .plan-premium { color: var(--green); }
@media (max-width: 620px) { .compare th, .compare td { padding: 12px 12px; font-size: 0.85rem; } }

/* ---- Plans ---- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 720px; margin: 0 auto; }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }
.plan { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; background: var(--surface); }
.plan.best { border-color: #fff; background: var(--surface-2); }
.plan .price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; }
.plan .per { color: var(--text-2); font-weight: 600; font-size: 1rem; }
.plan .save { color: var(--green); font-weight: 700; font-size: 0.9rem; margin-top: 4px; }

/* ---- Steps ---- */
.steps { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step .num { font-size: 0.9rem; font-weight: 800; color: var(--text-3); letter-spacing: 0.1em; }
.step h3 { margin: 10px 0 6px; }
.step p { margin: 0; }

/* ---- Check list ---- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .tick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(52,211,153,0.14); display: grid; place-items: center; margin-top: 2px; }
.checks .tick svg { width: 13px; height: 13px; color: var(--green); }
.checks b { font-weight: 700; }
.checks span { display: block; color: var(--text-2); font-size: 0.92rem; }

/* ---- CTA band ---- */
.band { background: var(--surface-2); border: 1px solid var(--border); border-radius: 26px; padding: clamp(32px, 6vw, 56px); text-align: center; }
.band h2 { margin-bottom: 12px; }

/* ---- Legal / prose ---- */
.prose { max-width: 780px; margin: 0 auto; }
.prose h2 { font-size: 1.35rem; margin-top: 40px; }
.prose h3 { font-size: 1.08rem; margin-top: 26px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.prose a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.updated { color: var(--text-3); font-size: 0.9rem; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--green); background: var(--surface); border-radius: 12px; padding: 16px 18px; margin: 18px 0; }
.callout.warn { border-left-color: var(--red); }
.callout p:last-child { margin-bottom: 0; }
.toc { border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; background: var(--surface); margin-bottom: 30px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.toc a { color: var(--text-2); text-decoration: none; }
.toc a:hover { color: #fff; }

/* ---- FAQ ---- */
.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-2); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { color: #fff; }
.faq .a { padding: 0 20px 18px; color: var(--text-2); }
.faq .a p { margin: 0 0 0.7em; }
.faq .a p:last-child { margin-bottom: 0; }

/* ---- Forms ---- */
.form { max-width: 620px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--border); color: #fff;
  border-radius: 12px; padding: 13px 14px; font: inherit; font-size: 0.98rem;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.form-note { font-size: 0.85rem; color: var(--text-3); }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding: 52px 0 40px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); font-weight: 700; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { color: var(--text-2); font-size: 0.95rem; }
.footer a:hover { color: #fff; }
.footer .about p { font-size: 0.92rem; max-width: 34ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 0.86rem; }

/* ---- Reveal animation ---- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s cubic-bezier(0.22,1,0.36,1), transform 0.6s cubic-bezier(0.22,1,0.36,1); will-change: opacity, transform; }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card, .btn, .nav-links a { transition: none !important; }
}

.hr { height: 1px; background: var(--border); border: 0; margin: 0; }
.stack-sm > * + * { margin-top: 10px; }
