/* ==========================================================================
   FamWally Official Landing Page Design System
   Faithfully aligned with the FamWally App (Plus Jakarta Sans, Inter, 
   Deep Navy Slate #081420, Primary Blue #3b82f6, Financial Semantics)
   ========================================================================== */

:root {
  /* Fonts directly from FamWally App */
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Color Palette — Aligned with FamWally theme.css */
  --bg-app: #081420;
  --bg-base: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2234;
  --bg-surface-glass: rgba(17, 24, 39, 0.88);
  --bg-card: #131b2e;
  --bg-card-hover: #18233c;
  --bg-input: #0e1626;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-glow: rgba(59, 130, 246, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-white: #ffffff;

  /* Brand Accents */
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.25);

  /* Semantic Financial Colors */
  --color-income: #10b981;       /* Emerald */
  --color-income-glow: rgba(16, 185, 129, 0.15);
  --color-expense: #f43f5e;      /* Rose */
  --color-expense-glow: rgba(244, 63, 94, 0.15);
  --color-transfer: #8b5cf6;     /* Violet */
  --color-warning: #f59e0b;      /* Amber */
  --color-info: #0ea5e9;         /* Sky */

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow-blue: 0 0 30px rgba(37, 99, 235, 0.22);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-app);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 20, 32, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 72px;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: #ffffff;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-large {
  padding: 13px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-heading);
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.25);
}

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

.hero-section {
  padding: 72px 0 80px;
  background: radial-gradient(circle at 50% 10%, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-layout {
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #60a5fa;
  background-color: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-income);
  box-shadow: 0 0 8px var(--color-income);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.8vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-white);
  margin-bottom: 20px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #60a5fa, #3b82f6, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 740px;
  margin: 0 auto 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero-guarantee {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-guarantee span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hero UI Showcase Container */
.hero-mockup-wrapper {
  margin-top: 56px;
  position: relative;
}

.hero-mockup-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), var(--shadow-glow-blue);
  overflow: hidden;
  padding: 8px;
}

.hero-mockup-frame img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quick Metrics Row below hero */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
  text-align: left;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.metric-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.metric-change {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.metric-change.positive { color: var(--color-income); }
.metric-change.neutral { color: var(--text-secondary); }
.metric-change.highlight { color: #60a5fa; }

/* ==========================================================================
   Sections Core
   ========================================================================== */

.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-500);
  background-color: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-white);
  margin-bottom: 16px;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Feature Interactive Cards: The 9 Core Pillars
   ========================================================================== */

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

.feature-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: var(--shadow-md);
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.icon-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.icon-violet { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.icon-sky { background: rgba(14, 165, 233, 0.15); color: #38bdf8; }

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.feature-highlights {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-highlights li {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-highlights li svg {
  color: var(--color-income);
  flex-shrink: 0;
}

/* ==========================================================================
   Deep Dive Showcase (Alternating Visual Rows)
   ========================================================================== */

.deep-row {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}

.deep-row.reversed {
  grid-template-columns: 1.15fr 1fr;
}

.deep-row:last-child {
  margin-bottom: 0;
}

.deep-text {
  max-width: 500px;
}

.deep-tag {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  display: block;
}

.deep-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.25;
  margin-bottom: 14px;
}

.deep-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.deep-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deep-checklist li {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.deep-checklist li svg {
  color: var(--primary-500);
  margin-top: 3px;
  flex-shrink: 0;
}

.deep-visual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.deep-visual-card img {
  width: 100%;
  border-radius: calc(var(--radius-lg) - 6px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Section: Security & Privacy
   ========================================================================== */

.security-section {
  background-color: var(--bg-base);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.trust-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  text-align: left;
}

.trust-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 10px;
}

.trust-card p {
  font-size: 0.90625rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   Section: Final CTA
   ========================================================================== */

.cta-section {
  padding: 96px 0;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.16) 0%, transparent 70%);
  text-align: center;
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(37, 99, 235, 0.2);
  max-width: 820px;
  margin: 0 auto;
}

.cta-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-card p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 18px;
}

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

.site-footer {
  background-color: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

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

.footer-brand-logo {
  height: 36px;
  width: auto;
  margin-bottom: 14px;
  image-rendering: -webkit-optimize-contrast;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-white);
  margin-bottom: 16px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-list a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-nav-list a:hover {
  color: var(--primary-500);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

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

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

  .deep-row,
  .deep-row.reversed {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .features-grid,
  .trust-grid,
  .metrics-strip {
    grid-template-columns: 1fr;
  }

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

  .footer-cols {
    flex-direction: column;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn-primary,
  .cta-actions .btn-secondary {
    width: 100%;
  }
}
