/* ============================================================
   Finpal Landing Page Styles — palette matches the app (dark green)
   ============================================================ */

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

:root {
  /* Mirrors frontend/src/theme/colors.ts */
  --bg:            #0D1F18;            /* app COLORS.bg */
  --bg-alt:        #162C21;            /* app COLORS.card */
  --bg-dark:       #08110C;            /* darker still, footer */
  --green:         #2ECC71;            /* app greenBright — primary accent */
  --green-dark:    #1A7A4A;            /* app greenPrimary — hover / depth */
  --green-soft:    rgba(46, 204, 113, 0.12);
  --blue:          #378ADD;            /* app blue */
  --blue-soft:     rgba(55, 138, 221, 0.12);
  --purple:        #AF52DE;
  --purple-soft:   rgba(175, 82, 222, 0.12);
  --orange:        #EF9F27;            /* app amber */
  --orange-soft:   rgba(239, 159, 39, 0.12);
  --red:           #E24B4A;            /* app red */

  --text:           #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary:  rgba(255, 255, 255, 0.4);
  --text-muted:     rgba(255, 255, 255, 0.35);

  --border:        rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 2px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 31, 24, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--green-dark);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
  background: var(--green);
  transform: translateY(-1px);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--green-dark);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26, 122, 74, 0.45);
}

.btn-primary:hover {
  background: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(46, 204, 113, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 18px;
  border-radius: 14px;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: 160px 24px 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.10) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26, 122, 74, 0.10) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
  border: 1px solid rgba(46, 204, 113, 0.25);
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-strong);
}

/* ============================================================
   Section Common
   ============================================================ */

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 12px;
}

.section-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ============================================================
   Features
   ============================================================ */

.features {
  padding: 120px 24px;
  background: var(--bg);
}

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

.feature-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon-blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.feature-icon-green {
  background: var(--green-soft);
  color: var(--green);
}

.feature-icon-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.feature-icon-orange {
  background: var(--orange-soft);
  color: var(--orange);
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ============================================================
   How It Works
   ============================================================ */

.how-it-works {
  padding: 120px 24px;
  background: var(--bg-alt);
}

.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-number {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 122, 74, 0.35);
}

.step-content {
  padding-top: 4px;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.step-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  opacity: 0.4;
  margin-left: 25px;
  border-radius: 1px;
}

/* ============================================================
   Security
   ============================================================ */

.security {
  padding: 120px 24px;
  background: var(--bg);
}

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

.security-item {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.security-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.security-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.security-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.security-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ============================================================
   CTA Section
   ============================================================ */

.cta {
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(135deg, #0A1611 0%, var(--green-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(46, 204, 113, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta > * {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #fff;
}

.cta-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  max-width: 500px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.cta .btn-primary {
  background: var(--green);
  color: #0A1611;
  box-shadow: 0 4px 24px rgba(46, 204, 113, 0.55);
}

.cta .btn-primary:hover {
  background: #5fe09a;
  color: #0A1611;
  box-shadow: 0 8px 32px rgba(46, 204, 113, 0.65);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .logo-text {
  color: #fff;
}

.footer-tagline {
  font-size: 14px;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--green);
}

.footer-bottom {
  padding-top: 32px;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   Animations (fade in on scroll via CSS)
   ============================================================ */

.feature-card,
.step,
.security-item {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.6s ease forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(5) { animation-delay: 0.5s; }

.security-item:nth-child(1) { animation-delay: 0.1s; }
.security-item:nth-child(2) { animation-delay: 0.2s; }
.security-item:nth-child(3) { animation-delay: 0.3s; }
.security-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 120px 20px 80px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-divider {
    display: none;
  }

  .section-title {
    font-size: 30px;
  }

  .section-subtitle {
    font-size: 16px;
  }

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

  .security-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: 28px;
  }

  .footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }

  .cta-title {
    font-size: 28px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .section-title {
    font-size: 26px;
  }

  .step {
    gap: 16px;
  }

  .step-number {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 18px;
    border-radius: 12px;
  }

  .step-connector {
    margin-left: 21px;
    height: 32px;
  }
}

/* ============================================================
   Plaid / legal document pages (plaid.html, privacy.html, terms.html)
   ============================================================ */

.doc-main {
  padding: 96px 24px 64px;
  min-height: 100vh;
}

.doc-inner {
  max-width: 720px;
  margin: 0 auto;
}

.doc-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.doc-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.doc-lead {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.doc-section {
  margin-bottom: 36px;
}

.doc-section h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.doc-section p,
.doc-section li {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.doc-section ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.doc-section li {
  margin-bottom: 8px;
}

.doc-section a {
  color: var(--green);
  font-weight: 500;
}

.doc-section a:hover {
  text-decoration: underline;
}

.doc-callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin-bottom: 32px;
}

.doc-callout p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.doc-callout p + p {
  margin-top: 10px;
}

.doc-back {
  display: inline-block;
  margin-top: 40px;
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
}

.doc-back:hover {
  text-decoration: underline;
}
