:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --income: #16a34a;
  --expense: #dc2626;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --gradient-income: linear-gradient(135deg, #059669, #34d399);
  --gradient-accent: linear-gradient(135deg, #2563eb, #818cf8);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --max-width: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.875rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Hero */

.hero {
  padding: 4rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 768px) {
  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0 0 1.75rem;
  max-width: 34ch;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.pill {
  padding: 0.375rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-badge:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.store-badge--primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.store-badge--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.store-badge--soon {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}

.store-note {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Phone mockup / hero visual */

.phone-frame {
  position: relative;
  max-width: 280px;
  margin-inline: auto;
  padding: 12px;
  background: var(--text);
  border-radius: 36px;
  box-shadow: var(--shadow), 0 24px 48px rgba(15, 23, 42, 0.12);
}

.phone-screen {
  aspect-ratio: 390 / 844;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.phone-placeholder span {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Sections */

.section {
  padding: 3.5rem 0;
}

.section--surface {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 2.5rem;
}

.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
}

.section-header code {
  font-size: 0.875em;
  padding: 0.125rem 0.375rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-card .emoji {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin: 0 0 0.375rem;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Screenshots gallery */

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 768px) {
  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.screenshot-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screenshot-card img {
  width: 100%;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
}

.screenshot-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 390 / 844;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.screenshot-placeholder strong {
  display: block;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.screenshot-card figcaption {
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* Privacy / legal pages */

.page-hero {
  padding: 3rem 0 2rem;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.page-hero p {
  margin: 0;
  color: var(--text-secondary);
}

.prose {
  max-width: 42rem;
  margin: 0 auto;
  padding-bottom: 3rem;
}

.prose h2 {
  font-size: 1.125rem;
  margin: 2rem 0 0.75rem;
}

.prose p,
.prose li {
  color: var(--text-secondary);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.375rem;
}

.prose a {
  word-break: break-all;
}

.info-box {
  padding: 1.25rem 1.5rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.support-card {
  max-width: 32rem;
  margin: 0 auto 3rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.support-card .emoji {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.support-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

.support-card p {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.btn:hover {
  text-decoration: none;
  opacity: 0.95;
}

/* Footer */

.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 28ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-copy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}
