/* ═══════════════════════════════════════
   Budget App — Showcase Website Styles
   Dark theme matching the desktop app
   ═══════════════════════════════════════ */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #121820;
  --bg-card: #161d27;
  --bg-card-hover: #1c2533;
  --bg-darker: #0a0e14;
  --text-primary: #d8dee9;
  --text-secondary: #8899aa;
  --text-muted: #5a6b7d;
  --accent: #5ce0b8;
  --accent-light: #8aecd0;
  --accent-glow: rgba(92, 224, 184, 0.2);
  --green: #7cd8a8;
  --red: #f0918a;
  --yellow: #f5c882;
  --blue: #7eb8e0;
  --border: #1e2a38;
  --border-light: #2a3848;
  --radius: 12px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --nav-height: 64px;
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85em;
  background: rgba(92, 224, 184, 0.1);
  color: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  transition: border-color 0.2s, background 0.2s;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 4px;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  padding: 140px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-light);
  background: rgba(92, 224, 184, 0.1);
  border: 1px solid rgba(92, 224, 184, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #5ce0b8, #8aecd0, #7eb8e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-download-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0d1117;
}

.btn-primary:hover {
  background: #4ad4a6;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat strong {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.hero-stat span {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-light);
}

/* ─── Hero Screenshot ─── */
.hero-screenshot {
  max-width: 960px;
  margin: 60px auto 0;
  position: relative;
}

.screenshot-placeholder {
  background: var(--bg-card);
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  min-height: 400px;
  transition: border-color 0.3s;
}

.screenshot-placeholder:hover {
  border-color: var(--accent);
}

.screenshot-placeholder svg {
  opacity: 0.4;
}

.screenshot-placeholder p {
  font-size: 14px;
  text-align: center;
  line-height: 1.6;
}

.screenshot-placeholder img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

/* ─── Sections ─── */
.section {
  padding: 100px 24px;
}

.section-dark {
  background: var(--bg-darker);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ─── Features Grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ─── Screenshots Grid ─── */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.screenshot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.screenshot-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.screenshot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border-bottom: 1px solid var(--border);
}

.screenshot-card h4 {
  font-size: 16px;
  font-weight: 600;
  padding: 16px 20px 4px;
}

.screenshot-card > p {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 0 20px 16px;
  line-height: 1.5;
}

/* ─── How It Works (Tiers) ─── */
.tiers {
  max-width: 640px;
  margin: 0 auto;
}

.tier-card {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  transition: border-color 0.3s;
}

.tier-card:hover {
  border-color: var(--accent);
}

.tier-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(92, 224, 184, 0.15);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tier-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.tier-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.tier-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tier-badge {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.tier-badge-green { background: rgba(124, 216, 168, 0.15); color: #7cd8a8; }
.tier-badge-yellow { background: rgba(245, 200, 130, 0.15); color: #f5c882; }
.tier-badge-purple { background: rgba(92, 224, 184, 0.15); color: #8aecd0; }

.tier-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
  margin-left: 48px;
}

.tier-connector span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ─── Tech Stack ─── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.stack-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}

.stack-item:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.stack-icon {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.stack-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stack-item p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Docs Grid ─── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.3s, transform 0.2s, background 0.2s;
}

.doc-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.doc-number {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(92, 224, 184, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.doc-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 24px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-left .nav-logo {
  margin-bottom: 12px;
}

.footer-left p {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 300px;
}

.footer-right {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h5 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── Animations ─── */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid .animate-in:nth-child(2) { transition-delay: 0.05s; }
.features-grid .animate-in:nth-child(3) { transition-delay: 0.1s; }
.features-grid .animate-in:nth-child(4) { transition-delay: 0.15s; }
.features-grid .animate-in:nth-child(5) { transition-delay: 0.2s; }
.features-grid .animate-in:nth-child(6) { transition-delay: 0.25s; }
.features-grid .animate-in:nth-child(7) { transition-delay: 0.3s; }
.features-grid .animate-in:nth-child(8) { transition-delay: 0.35s; }

.screenshots-grid .animate-in:nth-child(2) { transition-delay: 0.08s; }
.screenshots-grid .animate-in:nth-child(3) { transition-delay: 0.16s; }
.screenshots-grid .animate-in:nth-child(4) { transition-delay: 0.24s; }
.screenshots-grid .animate-in:nth-child(5) { transition-delay: 0.32s; }
.screenshots-grid .animate-in:nth-child(6) { transition-delay: 0.4s; }

.stack-grid .animate-in:nth-child(2) { transition-delay: 0.04s; }
.stack-grid .animate-in:nth-child(3) { transition-delay: 0.08s; }
.stack-grid .animate-in:nth-child(4) { transition-delay: 0.12s; }
.stack-grid .animate-in:nth-child(5) { transition-delay: 0.16s; }
.stack-grid .animate-in:nth-child(6) { transition-delay: 0.2s; }
.stack-grid .animate-in:nth-child(7) { transition-delay: 0.24s; }
.stack-grid .animate-in:nth-child(8) { transition-delay: 0.28s; }

.docs-grid .animate-in:nth-child(2) { transition-delay: 0.05s; }
.docs-grid .animate-in:nth-child(3) { transition-delay: 0.1s; }
.docs-grid .animate-in:nth-child(4) { transition-delay: 0.15s; }
.docs-grid .animate-in:nth-child(5) { transition-delay: 0.2s; }
.docs-grid .animate-in:nth-child(6) { transition-delay: 0.25s; }
.docs-grid .animate-in:nth-child(7) { transition-delay: 0.3s; }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 11, 16, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 120px 20px 60px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-stats {
    gap: 20px;
  }

  .hero-stat-divider {
    display: none;
  }

  .hero-screenshot {
    margin-top: 40px;
  }

  .screenshot-placeholder {
    min-height: 200px;
    padding: 40px 20px;
  }

  .section {
    padding: 60px 20px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
  }

  .docs-grid {
    grid-template-columns: 1fr;
  }

  .tier-card {
    padding: 20px;
  }

  .tier-connector {
    margin-left: 36px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-right {
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 30px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    justify-content: center;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
