:root {
  --bg: #F8FAFC;
  --ink: #0F172A;
  --ink-soft: #475569;
  --navy: #1E293B;
  --accent: #7C3AED;
  --accent-soft: #EDE9FE;
  --income: #16A34A;
  --expense: #DC2626;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(15, 23, 42, 0.25);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: no-preference) {
  .phone { animation: float 6s ease-in-out infinite; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(-1deg); }
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

.accent { color: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
}
.nav-links {
  display: flex;
  gap: 32px;
  font-weight: 500;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { position: relative; }
.lang-switch-btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}
.lang-switch-btn:hover { border-color: var(--navy); color: var(--ink); }
.lang-switch-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  z-index: 30;
}
.lang-switch:hover .lang-switch-menu,
.lang-switch:focus-within .lang-switch-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-switch-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}
.lang-switch-menu li a:hover { background: var(--accent-soft); color: var(--accent); }
.lang-switch-menu li a[aria-current="true"] { color: var(--accent); font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.45); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-sm { padding: 9px 18px; font-size: 0.88rem; }
.btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

/* Hero */
.hero { padding: 88px 0 96px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.eyebrow.center { display: block; text-align: center; margin-left: auto; margin-right: auto; width: fit-content; }

h1 {
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

.lede { margin-top: 22px; font-size: 1.12rem; color: var(--ink-soft); max-width: 46ch; }
.section-lede { margin-top: 14px; font-size: 1.08rem; color: var(--ink-soft); max-width: 56ch; }
.section-lede.center { margin-left: auto; margin-right: auto; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-ctas.center-ctas { justify-content: center; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.86rem; color: var(--ink-soft); }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 300px;
  border-radius: 40px;
  background: var(--navy);
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 22px;
  background: var(--navy);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  background: var(--bg);
  border-radius: 28px;
  padding: 40px 16px 20px;
  min-height: 480px;
}
.app-hero {
  background: var(--navy);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #fff;
}
.app-hero-row { display: flex; align-items: center; justify-content: space-between; }
.app-hello { font-weight: 700; font-size: 0.95rem; }
.app-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); }
.app-label { margin-top: 18px; font-size: 0.76rem; color: #CBD5E1; }
.app-amount { margin-top: 4px; font-size: 1.7rem; font-weight: 700; }
.app-amount span { color: #94A3B8; font-size: 1.1rem; }
.app-month { margin-top: 14px; font-size: 0.78rem; color: #CBD5E1; }

.app-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
}
.app-card-row { display: flex; align-items: center; justify-content: space-between; }
.chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.chip-fixed { background: var(--accent-soft); color: var(--accent); }
.chip-variable { background: #FEF3C7; color: #B45309; }
.app-card-amount { font-weight: 700; font-size: 0.95rem; }
.app-card-title { margin-top: 10px; font-weight: 700; font-size: 0.98rem; }
.app-card-sub { margin-top: 3px; font-size: 0.78rem; color: var(--ink-soft); }

/* Philosophy */
.philosophy { padding: 88px 0; background: var(--navy); color: #fff; }
.philosophy h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.compare-col {
  border-radius: var(--radius-md);
  padding: 28px;
}
.compare-bad { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.compare-good { background: rgba(124, 58, 237, 0.18); border: 1px solid rgba(124, 58, 237, 0.4); }
.compare-label { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: #94A3B8; margin-bottom: 16px; }
.compare-good .compare-label { color: #D8B4FE; }
.compare-col ul { display: flex; flex-direction: column; gap: 14px; }
.compare-col li { font-size: 0.98rem; line-height: 1.5; color: #E2E8F0; padding-left: 20px; position: relative; }
.compare-col li::before { content: "–"; position: absolute; left: 0; color: #64748B; }
.compare-good li::before { content: "✓"; color: #C4B5FD; }

/* Features */
.features { padding: 96px 0; }
.features h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 12px; }
.center { text-align: center; }

.mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 48px;
}
.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.mode-icon { font-size: 1.8rem; }
.mode-card h3 { margin-top: 14px; font-size: 1.25rem; font-weight: 800; }
.mode-card p { margin-top: 10px; color: var(--ink-soft); font-size: 0.98rem; }

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}
.feature-item {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}
.feature-item h4 { font-weight: 800; font-size: 1.05rem; }
.feature-item p { margin-top: 8px; color: var(--ink-soft); font-size: 0.92rem; }

/* How it works */
.how { padding: 96px 0; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-top: 12px; }
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 52px;
}
.step-num { display: block; font-size: 0.85rem; font-weight: 700; color: var(--accent); }
.steps h4 { margin-top: 12px; font-size: 1.1rem; font-weight: 800; }
.steps p { margin-top: 8px; color: var(--ink-soft); font-size: 0.95rem; }

/* Download */
.download { padding: 96px 0; text-align: center; }
.download h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; }
.download .hero-note { margin-top: 20px; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a:hover { color: var(--ink); }

/* Focus visibility */
a:focus-visible, .btn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .compare { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .nav-links { display: none; }
}
@media (max-width: 480px) {
  .phone { width: 100%; max-width: 300px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1120;
    --ink: #F1F5F9;
    --ink-soft: #94A3B8;
    --navy: #1E293B;
    --surface: #131C2E;
    --border: #1E2A3F;
    --accent-soft: rgba(124, 58, 237, 0.18);
  }
  .nav { background: rgba(11, 17, 32, 0.85); }
  .btn-primary { background: var(--accent); }
  .app-card { background: #0F1729; }
}
