/* ═══════════════════════════════════════════════════════════
   Finnypal — Global Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Brand palette */
  --teal: #00B896;
  --teal-dark: #009A7D;
  --teal-light: #E0F7F1;
  --amber: #FFB830;
  --amber-dark: #E5A020;
  --navy: #0D1F3C;
  --navy-light: #152A4A;
  --soft-white: #F5FBF9;
  --text-gray: #6B7A8D;
  --text-dark: #1A2B3F;
  --border-light: #E2EAE7;
  --card-bg: #FFFFFF;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-hero: clamp(2rem, 5vw, 3.25rem);
  --fs-h1: clamp(1.75rem, 4vw, 2.5rem);
  --fs-h2: clamp(1.35rem, 3vw, 1.75rem);
  --fs-h3: 1.15rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.8125rem;
  --lh-body: 1.65;
  --lh-heading: 1.25;

  /* Spacing */
  --section-py: clamp(3.5rem, 8vw, 6rem);
  --container-max: 1120px;
  --container-px: clamp(1.25rem, 4vw, 2rem);

  /* Misc */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --shadow-card: 0 2px 16px rgba(13, 31, 60, 0.06);
  --shadow-card-hover: 0 8px 32px rgba(13, 31, 60, 0.10);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-gray);
  background: var(--soft-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--teal-dark);
}

h1, h2, h3, h4 {
  color: var(--navy);
  line-height: var(--lh-heading);
  font-weight: 700;
}

/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(13, 31, 60, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0;
}
.logo-finny { color: var(--teal); }
.logo-pal   { color: var(--amber); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--fs-small);
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover {
  color: #fff;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-family);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 184, 150, 0.3);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}
.btn-outline:hover {
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: clamp(7rem, 14vw, 10rem) 0 var(--section-py);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative gradient orbs */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
  pointer-events: none;
}
.hero::before {
  width: 500px;
  height: 500px;
  background: var(--teal);
  top: -150px;
  right: -100px;
}
.hero::after {
  width: 400px;
  height: 400px;
  background: var(--amber);
  bottom: -100px;
  left: -100px;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-subhead {
  font-size: clamp(0.875rem, 2vw, 1.05rem);
  color: var(--text-gray);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero-note {
  font-size: var(--fs-xs);
  color: rgba(107, 122, 141, 0.7);
}

/* ── Section Headings ─────────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}
.section-heading h2 {
  font-size: var(--fs-h1);
  margin-bottom: 0.5rem;
}
.section-heading p {
  max-width: 520px;
  margin: 0 auto;
  font-size: var(--fs-body);
}
.section-heading .accent-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  margin-bottom: 0.75rem;
}

/* ── Features Section ─────────────────────────────────────── */
.features {
  padding: var(--section-py) 0;
  background: var(--soft-white);
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.feature-icon.teal-bg {
  background: var(--teal-light);
  color: var(--teal);
}
.feature-icon.amber-bg {
  background: #FFF5E0;
  color: var(--amber-dark);
}

.feature-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: 0.5rem;
}
.feature-card p {
  font-size: var(--fs-small);
  line-height: 1.6;
}

/* ── Screenshots Section ──────────────────────────────────── */
.screenshots {
  padding: var(--section-py) 0;
  background: var(--navy);
  text-align: center;
  overflow: hidden;
}
.screenshots .section-heading h2,
.screenshots .section-heading p {
  color: #fff;
}
.screenshots .section-heading p {
  color: var(--text-gray);
}

.screenshots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.phone-mockup {
  width: 220px;
  border-radius: 28px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition);
  background: var(--navy-light);
  aspect-ratio: 9 / 19.5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.phone-mockup:hover {
  transform: translateY(-8px) scale(1.02);
}

.phone-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.phone-mockup-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}
.phone-mockup-placeholder .mock-icon {
  font-size: 2.5rem;
  opacity: 0.6;
}
.phone-mockup-placeholder span {
  font-size: var(--fs-xs);
  color: var(--text-gray);
  opacity: 0.6;
}

/* ── Why Finnypal Section ─────────────────────────────────── */
.why-section {
  padding: var(--section-py) 0;
  background: var(--soft-white);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.why-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}

.why-card .why-emoji {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  display: block;
}

.why-card h3 {
  font-size: var(--fs-h3);
  margin-bottom: 0.5rem;
}
.why-card p {
  font-size: var(--fs-small);
  line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.6);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand .logo {
  margin-bottom: 0.5rem;
}
.footer-brand .footer-tagline {
  font-size: var(--fs-small);
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-col h4 {
  color: #fff;
  font-size: var(--fs-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 0.6rem;
}
.footer-col ul li a {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--fs-small);
  transition: color var(--transition);
}
.footer-col ul li a:hover {
  color: var(--teal);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
}
.footer-bottom .built-in-india {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── Legal Pages (Privacy / Terms) ────────────────────────── */
.legal-page {
  padding: clamp(6rem, 12vw, 8rem) 0 var(--section-py);
}

.legal-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--teal);
  margin-bottom: 2rem;
  transition: all var(--transition);
}
.legal-back:hover {
  gap: 0.6rem;
  color: var(--teal-dark);
}

.legal-container h1 {
  font-size: var(--fs-h1);
  margin-bottom: 0.5rem;
}

.legal-meta {
  font-size: var(--fs-small);
  color: var(--text-gray);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.legal-container h2 {
  font-size: var(--fs-h2);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-container h3 {
  font-size: var(--fs-h3);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.legal-container p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-container ul,
.legal-container ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.legal-container li {
  margin-bottom: 0.4rem;
  line-height: 1.65;
}

.legal-container strong {
  color: var(--text-dark);
  font-weight: 600;
}

.legal-container a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── 404 Page ─────────────────────────────────────────────── */
.page-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--navy);
  padding: 2rem;
}

.page-404-content h1 {
  font-size: clamp(5rem, 15vw, 10rem);
  color: var(--teal);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.2;
}
.page-404-content h2 {
  color: #fff;
  font-size: var(--fs-h1);
  margin-bottom: 0.75rem;
}
.page-404-content p {
  color: var(--text-gray);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Animations ───────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.3s; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(13, 31, 60, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 1.5rem 0;
    gap: 1rem;
    transform: translateY(-120%);
    transition: transform var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links.open {
    transform: translateY(0);
  }

  .hamburger {
    display: flex;
  }

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

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

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem;
  }
  .hero-buttons .btn {
    width: 100%;
  }

  .phone-mockup {
    width: 160px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .screenshots-row {
    gap: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .why-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
