/* ==========================================================================
   MONEYMAP DESIGN SYSTEM — GLOBAL CSS
   Premium Fintech / SaaS Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Surface & Background Hierarchy */
  --bg-primary: #070913;
  --bg-secondary: #0c1122;
  --bg-surface: #10162f;
  --bg-card: #141c3a;
  --bg-card-hover: #1a254d;
  --bg-card-elevated: #1e2a54;
  --bg-glass: rgba(18, 26, 54, 0.72);
  --bg-glass-card: rgba(20, 28, 58, 0.6);

  /* Primary Brand Palettes */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.35);

  /* Financial Accents */
  --emerald: #10b981;
  --emerald-light: #34d399;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --cyan-glow: rgba(6, 182, 212, 0.3);
  --violet: #8b5cf6;
  --violet-glow: rgba(139, 92, 246, 0.3);
  --amber: #f59e0b;
  --rose: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.25);

  /* Typography Colors */
  --text-white: #ffffff;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(99, 102, 241, 0.6);
  --border-glow: rgba(99, 102, 241, 0.4);

  /* Shadows */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 0 35px var(--primary-glow);
  --shadow-emerald-glow: 0 0 35px var(--emerald-glow);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-emerald: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-violet: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  --grad-dark-card: linear-gradient(145deg, rgba(22, 31, 64, 0.7) 0%, rgba(13, 18, 38, 0.8) 100%);
  --grad-glass-border: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.02) 100%);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Border Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --trans-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast), opacity var(--trans-fast);
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-narrow {
  max-width: 900px;
}

.container-wide {
  max-width: 1360px;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-white);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.4rem, 4.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.75rem); }
h4 { font-size: 1.25rem; font-weight: 600; }

p, .content p, .card p, article p, section p, .section-header p, .hero-content p, .hero-desc, .feature-card p, .story-card-wrapper p, .principle-card p, .faq-answer p, .pricing-card p, .flow-step p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  text-align: justify;
  text-justify: inter-word;
}

.text-gradient {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-gradient-emerald {
  background: var(--grad-emerald);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-bottom: 16px;
}

.section-badge.emerald {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--emerald-light);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--trans-normal);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 6px 26px rgba(99, 102, 241, 0.55);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-emerald {
  background: var(--grad-emerald);
  color: #070913;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
}

.btn-emerald:hover {
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.55);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-light);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 1.05rem;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   Fintech Glassmorphism Cards
   ========================================================================== */
.card-glass {
  background: var(--grad-dark-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--trans-normal);
  position: relative;
}

.card-glass:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.15);
  transform: translateY(-4px);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 18px;
  background: rgba(16, 22, 47, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--trans-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  background: rgba(20, 28, 58, 0.95);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Page Wrappers & Sections
   ========================================================================== */
.main-content {
  padding-top: 80px; /* Space for fixed/sticky header */
  min-height: calc(100vh - 400px);
}

.page-hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 350px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.22) 0%, rgba(6, 182, 212, 0.1) 45%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

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

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--trans-smooth);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.toast-success { border-left: 4px solid var(--emerald); }
.toast.toast-error { border-left: 4px solid var(--rose); }
.toast.toast-info { border-left: 4px solid var(--cyan); }
