/* ============================================
   KharchaGPT — "Aurora" Landing  (Light/Dark)
   ============================================ */

:root,
[data-theme="light"] {
  --primary: #5b5be7;
  --primary-muted: #8a8eff;
  --primary-faded: rgba(91, 91, 231, 0.08);
  --primary-glow: rgba(91, 91, 231, 0.22);
  --accent: #14b8a6;
  --accent-faded: rgba(20, 184, 166, 0.1);
  --bg: #fafbff;
  --bg-grad-1: rgba(91, 91, 231, 0.1);
  --bg-grad-2: rgba(168, 85, 247, 0.08);
  --bg-grad-3: rgba(20, 184, 166, 0.06);
  --surface: #ffffff;
  --surface-elev: #ffffff;
  --surface-low: #f1f3fa;
  --surface-glass: rgba(255, 255, 255, 0.7);
  --text: #0e1726;
  --text-strong: #050816;
  --muted: #5b6578;
  --outline: rgba(15, 23, 42, 0.08);
  --outline-strong: rgba(15, 23, 42, 0.14);
  --success: #0d9488;
  --error: #dc2626;
  --warning: #d97706;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.1);
  --shadow-primary: 0 8px 24px rgba(91, 91, 231, 0.25);
  --shadow-primary-hover: 0 12px 32px rgba(91, 91, 231, 0.35);
  --nav-bg: rgba(250, 251, 255, 0.72);
  --nav-border: rgba(15, 23, 42, 0.06);
  --bento-large-grad: linear-gradient(
    135deg,
    var(--surface) 0%,
    #fafbff 60%,
    var(--primary-faded) 100%
  );
  --bento-accent-grad: linear-gradient(135deg, #faf7ff 0%, #f0e9ff 100%);
  --bento-accent-border: rgba(139, 92, 246, 0.15);
  --cta-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  --tx-primary-bg: rgba(91, 91, 231, 0.12);
  --tx-primary-fg: #5b5be7;
  --tx-success-bg: rgba(13, 148, 136, 0.12);
  --tx-success-fg: #0d9488;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --font: "Manrope", system-ui, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #8b8cff;
  --primary-muted: #a78bfa;
  --primary-faded: rgba(139, 140, 255, 0.14);
  --primary-glow: rgba(139, 140, 255, 0.3);
  --accent: #2dd4bf;
  --accent-faded: rgba(45, 212, 191, 0.14);
  --bg: #07080f;
  --bg-grad-1: rgba(91, 91, 231, 0.22);
  --bg-grad-2: rgba(168, 85, 247, 0.18);
  --bg-grad-3: rgba(20, 184, 166, 0.14);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-elev: #11131f;
  --surface-low: #0d0f1a;
  --surface-glass: rgba(17, 19, 31, 0.7);
  --text: #e8ecf5;
  --text-strong: #ffffff;
  --muted: #8a93a8;
  --outline: rgba(255, 255, 255, 0.08);
  --outline-strong: rgba(255, 255, 255, 0.14);
  --success: #34d399;
  --error: #f87171;
  --warning: #fbbf24;
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 44px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  --shadow-primary: 0 8px 28px rgba(139, 140, 255, 0.4);
  --shadow-primary-hover: 0 14px 38px rgba(139, 140, 255, 0.55);
  --nav-bg: rgba(7, 8, 15, 0.6);
  --nav-border: rgba(255, 255, 255, 0.06);
  --bento-large-grad: linear-gradient(
    135deg,
    rgba(139, 140, 255, 0.06) 0%,
    rgba(17, 19, 31, 0.9) 60%,
    rgba(167, 139, 250, 0.12) 100%
  );
  --bento-accent-grad: linear-gradient(
    135deg,
    rgba(167, 139, 250, 0.12) 0%,
    rgba(139, 92, 246, 0.06) 100%
  );
  --bento-accent-border: rgba(167, 139, 250, 0.2);
  --cta-bg: linear-gradient(135deg, #0a0a18 0%, #1a1740 45%, #2a1c5c 100%);
  --tx-primary-bg: rgba(139, 140, 255, 0.18);
  --tx-primary-fg: #b4b6ff;
  --tx-success-bg: rgba(52, 211, 153, 0.18);
  --tx-success-fg: #6ee7b7;
  color-scheme: dark;
}

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
  transition:
    background-color 400ms ease,
    color 400ms ease;
}

/* ---- Aurora background (animated) ---- */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  transition: background 600ms ease;
}

.orb-1 {
  width: 620px;
  height: 620px;
  top: -220px;
  left: -200px;
  background: var(--bg-grad-1);
  animation: drift-1 22s ease-in-out infinite;
}

.orb-2 {
  width: 520px;
  height: 520px;
  top: 38%;
  right: -200px;
  background: var(--bg-grad-2);
  animation: drift-2 26s ease-in-out infinite;
}

.orb-3 {
  width: 440px;
  height: 440px;
  bottom: -120px;
  left: 28%;
  background: var(--bg-grad-3);
  animation: drift-3 30s ease-in-out infinite;
}

@keyframes drift-1 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(60px, 40px) scale(1.08);
  }
}

@keyframes drift-2 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-50px, -30px) scale(1.05);
  }
}

@keyframes drift-3 {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -50px) scale(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb-1,
  .orb-2,
  .orb-3 {
    animation: none;
  }
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  transition:
    background 400ms ease,
    border-color 400ms ease;
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.brand-mark.sm {
  width: 32px;
  height: 32px;
  font-size: 14px;
  border-radius: 10px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

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

.nav-links a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 200ms;
}

.nav-links a:not(.btn):hover {
  color: var(--primary);
}

/* ---- Theme toggle ---- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    background 300ms ease,
    color 300ms ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle:hover {
  border-color: var(--primary-muted);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all 200ms ease;
  text-decoration: none;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
  color: #fff;
  box-shadow: var(--shadow-primary);
  position: relative;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-hover);
}

.btn-ghost {
  background: var(--surface-elev);
  color: var(--text);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--primary-muted);
}

.btn-white {
  background: #fff;
  color: #312e81;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.btn-icon {
  font-size: 1.2em;
  transition: transform 200ms;
}

.btn-primary:hover .btn-icon {
  transform: translateX(4px);
}

/* ---- Eyebrow ---- */
.eyebrow {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-faded);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  min-height: 90vh;
}

.hero-content {
  max-width: 560px;
}

.hero-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.app-badge svg {
  color: var(--primary);
}

.hero h1 {
  margin-top: 16px;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.gradient-text {
  background: linear-gradient(
    120deg,
    var(--primary) 0%,
    var(--primary-muted) 40%,
    var(--accent) 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 8s ease-in-out infinite;
}

@keyframes shimmer-text {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gradient-text {
    animation: none;
  }
}

.hero-sub {
  margin-top: 20px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 32px;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.avatar-stack {
  display: flex;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border: 2px solid var(--surface-elev);
  margin-left: -8px;
}

.avatar:first-child {
  margin-left: 0;
}

.proof-text {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- Phone mockup ---- */
.hero-phone {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.phone-frame {
  width: 280px;
  background: var(--surface-elev);
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px var(--outline-strong),
    inset 0 0 0 1px var(--outline);
  transform: rotateY(-5deg) rotateX(2deg);
  transition:
    transform 600ms ease,
    background 400ms ease,
    box-shadow 400ms ease;
  animation: float 6s ease-in-out infinite;
}

.phone-frame:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

@keyframes float {
  0%,
  100% {
    transform: rotateY(-5deg) rotateX(2deg) translateY(0);
  }
  50% {
    transform: rotateY(-5deg) rotateX(2deg) translateY(-12px);
  }
}

.phone-notch {
  width: 100px;
  height: 24px;
  background: var(--surface-low);
  border-radius: 12px;
  margin: 0 auto 12px;
}

.phone-screen {
  background: var(--surface-low);
  border-radius: 24px;
  padding: 16px;
  min-height: 440px;
  transition: background 400ms ease;
}

.mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mock-title {
  font-weight: 800;
  font-size: 0.85rem;
}

.mock-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
}

.mock-insight {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--primary-faded);
  margin-bottom: 12px;
  align-items: flex-start;
}

.mock-insight-dot {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 2px;
}

.mock-insight-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--text);
}

.mock-insight-text {
  font-size: 0.55rem;
  color: var(--muted);
  line-height: 1.4;
}

.mock-balance-card {
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.mock-label {
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.mock-amount {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 4px 0;
}

.mock-change {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--success);
}

.mock-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.mock-pill {
  background: var(--surface-low);
  border-radius: 10px;
  padding: 8px;
}

.mock-pill span {
  font-size: 0.45rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.mock-pill strong {
  display: block;
  font-size: 0.75rem;
  margin-top: 2px;
}

.mock-transactions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-tx {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  padding: 10px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.mock-tx-icon-primary {
  background: var(--tx-primary-bg);
  color: var(--tx-primary-fg);
}

.mock-tx-icon-success {
  background: var(--tx-success-bg);
  color: var(--tx-success-fg);
}

.mock-tx-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.mock-tx-info {
  flex: 1;
}

.mock-tx-info strong {
  display: block;
  font-size: 0.65rem;
}

.mock-tx-info span {
  font-size: 0.5rem;
  color: var(--muted);
}

.mock-tx-amount {
  font-size: 0.7rem;
  font-weight: 700;
}

.mock-tx-amount.income {
  color: var(--success);
}

.mock-tx-amount.expense {
  color: var(--error);
}

/* ---- Metrics strip ---- */
.metrics {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
  background: var(--surface-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--outline);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.metric {
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: all 500ms ease;
}

.metric.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 48px;
  background: var(--outline);
}

/* ---- Features ---- */
.features {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-header {
  max-width: 560px;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-sub {
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

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

.feature-card {
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms ease,
    transform 500ms ease,
    box-shadow 300ms ease,
    border-color 300ms ease,
    background 400ms ease;
}

.feature-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.feature-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--primary-faded);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.feature-icon {
  font-size: 1.4rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ---- Built Different (bento showcase) ---- */
.built-different {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
}

.bento-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 500ms ease,
    transform 500ms ease,
    box-shadow 300ms ease,
    border-color 300ms ease,
    background 400ms ease;
}

.bento-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.bento-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: auto;
}

.bento-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
  background: var(--bento-large-grad);
}

.bento-dark {
  grid-column: span 1;
  grid-row: span 1;
  background: linear-gradient(135deg, #1e1b4b 0%, #4a4bd7 100%);
  color: #fff;
  border-color: transparent;
  box-shadow:
    var(--shadow-md),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.bento-dark h3 {
  color: #fff;
}

.bento-dark p {
  color: rgba(255, 255, 255, 0.75);
}

.bento-accent {
  background: var(--bento-accent-grad);
  border-color: var(--bento-accent-border);
}

.bento-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-faded);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bento-chip-dark {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

/* Live AI insight card inside the large bento */
.bento-insight-card {
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bento-insight-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bento-insight-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.bento-insight-head strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
}

.bento-insight-head span {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 600;
}

.bento-insight-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text);
}

.bento-insight-body strong {
  color: var(--primary);
  font-weight: 700;
}

/* Sparkline inside dark bento */
.bento-sparkline {
  width: 100%;
  height: 70px;
  display: block;
}

/* Privacy visual */
.bento-privacy {
  position: relative;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.bento-privacy-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.15);
}

.bento-privacy-line {
  flex: 0 0 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--success) 0%, var(--primary) 100%);
  margin: 0 10px;
}

.bento-privacy-lock {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-faded);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

/* Swipe to delete visual */
.bento-swipe {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 64px;
}

.bento-swipe-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  transform: translateX(-6px);
}

.bento-swipe-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-faded);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.bento-swipe-info {
  flex: 1;
  min-width: 0;
}

.bento-swipe-info strong {
  display: block;
  font-size: 0.82rem;
}

.bento-swipe-info span {
  font-size: 0.7rem;
  color: var(--muted);
}

.bento-swipe-amt {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--error);
}

.bento-swipe-action {
  width: 56px;
  border-radius: 12px;
  background: var(--error);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
}

/* Accent stat */
.bento-stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bento-stat strong {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25);
}

.bento-stat span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Mock bento row inside phone */
.mock-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mock-bento-card {
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-elev);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 68px;
}

.mock-bento-dark {
  background: linear-gradient(135deg, #1e1b4b, #4a4bd7);
  color: #fff;
}

.mock-bento-label {
  font-size: 0.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.mock-bento-value {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mock-bento-value-dark {
  color: var(--text-strong);
}

.mock-spark {
  width: 100%;
  height: 20px;
  margin-top: auto;
}

.mock-bento-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--surface-low);
  overflow: hidden;
  margin-top: auto;
}

.mock-bento-bar-fill {
  height: 100%;
  width: 62%;
  background: linear-gradient(90deg, var(--primary), var(--primary-muted));
  border-radius: 2px;
}

/* ---- How it works ---- */
.how-it-works {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.steps-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 48px;
}

.step {
  flex: 1;
  text-align: center;
  padding: 32px 24px;
  opacity: 0;
  transform: translateY(24px);
  transition: all 500ms ease;
}

.step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(74, 75, 215, 0.2);
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 260px;
  margin: 0 auto;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--primary-faded),
    var(--primary),
    var(--primary-faded)
  );
  margin-top: 56px;
  flex-shrink: 0;
  border-radius: 1px;
}

/* ---- CTA Banner ---- */
.cta-banner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

.cta-content {
  text-align: center;
  padding: 60px 40px;
  border-radius: var(--radius-lg);
  background: var(--cta-bg);
  color: #f1f5f9;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-content::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(139, 140, 255, 0.35) 0%,
    rgba(139, 140, 255, 0) 70%
  );
  top: -220px;
  right: -120px;
  filter: blur(40px);
}

.cta-content::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(45, 212, 191, 0.22) 0%,
    rgba(45, 212, 191, 0) 70%
  );
  bottom: -180px;
  left: -100px;
  filter: blur(50px);
}

.cta-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  position: relative;
}

.cta-content p {
  margin-top: 14px;
  color: rgba(241, 245, 249, 0.7);
  font-size: 1.05rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  position: relative;
}

.cta-platforms {
  display: flex;
  gap: 10px;
}

.platform-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.beta-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 12px;
}

.platform-launch {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.platform-launch-badge {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.platform-launch-badge.android-beta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 148, 136, 0.08);
  color: var(--success);
  border: 1px solid rgba(13, 148, 136, 0.25);
}

/* ---- Live status dot (pulsing) ---- */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
  flex-shrink: 0;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--success);
  opacity: 0.4;
  animation: live-pulse 1.8s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.app-badge.live-badge {
  background: rgba(13, 148, 136, 0.08);
  color: var(--success);
  border-color: rgba(13, 148, 136, 0.25);
  gap: 8px;
}

.platform-launch-badge.ios-launch {
  background: rgba(172, 179, 183, 0.08);
  color: var(--muted);
  border: 1px solid var(--outline);
}

/* ---- Footer ---- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--outline);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-link {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ---- Toast ---- */
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 300ms ease,
    transform 300ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Dark-mode polish ---- */
[data-theme="dark"] .feature-card,
[data-theme="dark"] .bento-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .bento-card:hover {
  box-shadow:
    var(--shadow-md),
    0 0 0 1px var(--primary-glow);
}

[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
}

[data-theme="dark"] .btn-primary::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--primary-muted));
  opacity: 0.5;
  filter: blur(14px);
  z-index: -1;
}

[data-theme="dark"] .feature-icon-wrap,
[data-theme="dark"] .bento-privacy-lock {
  background: var(--primary-faded);
  box-shadow: inset 0 0 0 1px var(--outline);
}

[data-theme="dark"] .bento-large {
  border: 1px solid var(--outline);
}

[data-theme="dark"] .nav {
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .platform-launch-badge.android-beta {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.25);
}

[data-theme="dark"] .app-badge.live-badge {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.25);
}

[data-theme="dark"] .live-dot {
  background: var(--success);
}

[data-theme="dark"] .live-dot::after {
  background: var(--success);
}

[data-theme="dark"] .mock-tx-amount.income {
  color: #6ee7b7;
}

[data-theme="dark"] .mock-tx-amount.expense {
  color: #fca5a5;
}

[data-theme="dark"] .step-number {
  box-shadow:
    0 8px 24px rgba(139, 140, 255, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .step-connector {
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary-muted),
    transparent
  );
  opacity: 0.5;
}

[data-theme="dark"] .bento-insight-body strong {
  color: var(--primary-muted);
}

[data-theme="dark"] .footer {
  border-top-color: var(--outline);
}

[data-theme="dark"] .feature-card:hover,
[data-theme="dark"] .bento-card:hover {
  border-color: var(--primary-glow);
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 60px 24px 40px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-sub {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-badges {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .platform-launch {
    justify-content: center;
  }

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

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(200px, auto);
  }

  .bento-large {
    grid-column: span 2;
    grid-row: span 1;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin: 0;
    background: linear-gradient(
      180deg,
      var(--primary-faded),
      var(--primary),
      var(--primary-faded)
    );
  }

  .metrics {
    flex-wrap: wrap;
    gap: 24px;
  }

  .metric-divider {
    display: none;
  }
}

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

  .hero h1 {
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

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

  .hero-phone {
    display: none;
  }

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

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

  .bento-large {
    grid-column: span 1;
  }

  .metrics {
    flex-direction: column;
    gap: 20px;
  }

  .cta-content {
    padding: 40px 24px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    transform: translateY(20px);
    width: auto;
    text-align: center;
  }

  .toast.is-visible {
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  .phone-frame {
    width: 240px;
  }

  .brand-name {
    font-size: 1rem;
  }
}
