/* ============================================================
   FEATURES.CSS — BachatAI
   Stacked scroll cards — PhonePe style
   ============================================================ */

/* ── SECTION ──────────────────────────────────────────────── */
#features {
  background: var(--color-bg); /* pure white — matches hero/problem */
  padding-top: 100px;
  padding-bottom: 0;
}

/* ── HEADER ───────────────────────────────────────────────── */
.features-header {
  text-align: center;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(30px);
}

.features-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 8px;
}

/* ── STACK CONTAINER ──────────────────────────────────────── */
.features-stack {
  position: relative;
}

/* ── BASE CARD ────────────────────────────────────────────── */
.fcard {
  position: sticky;
  top: 80px;

  /* Narrower width — centered with auto margins */
  max-width: 860px;
  margin: 0 auto 28px; /* more space between cards */

  border-radius: 40px;  /* more rounded */
  overflow: hidden;
  min-height: 560px;    /* slightly more height */

  box-shadow:
    0 2px 0 rgba(0,0,0,0.04),
    0 12px 48px rgba(0,0,0,0.07),
    0 2px 8px rgba(0,0,0,0.04);

  will-change: transform;
}

/* Card pastel backgrounds */
.fcard--1 { background: #FFFBEB; }
.fcard--2 { background: #EFF6FF; }
.fcard--3 { background: #F5F3FF; }
.fcard--4 { background: #ECFDF5; }

/* Colored top border per card */
.fcard::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.fcard--1::before { background: #F59E0B; }
.fcard--2::before { background: #3B82F6; }
.fcard--3::before { background: #8B5CF6; }
.fcard--4::before { background: #10B981; }

/* ── CARD INNER ───────────────────────────────────────────── */
.fcard-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 64px 60px;
  min-height: 560px;
}

/* ── LEFT — TEXT ──────────────────────────────────────────── */
.fcard-left {
  display: flex;
  flex-direction: column;
}

.fcard-num {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.12;
  color: var(--color-navy);
}

.fcard-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.fcard--1 .fcard-tag { background: rgba(245,158,11,0.15); color: #92400E; }
.fcard--2 .fcard-tag { background: rgba(59,130,246,0.15); color: #1E3A8A; }
.fcard--3 .fcard-tag { background: rgba(139,92,246,0.15); color: #4C1D95; }
.fcard--4 .fcard-tag { background: rgba(16,185,129,0.15); color: #064E3B; }

.fcard-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 800;
  color: var(--color-navy);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.fcard-desc {
  font-size: var(--text-base);
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 380px;
}

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

.fcard-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--color-navy);
  font-weight: 500;
}

.fcard-points li::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fcard--1 .fcard-points li::before { background: #F59E0B; }
.fcard--2 .fcard-points li::before { background: #3B82F6; }
.fcard--3 .fcard-points li::before { background: #8B5CF6; }
.fcard--4 .fcard-points li::before { background: #10B981; }

/* ── RIGHT — PHONE ────────────────────────────────────────── */
.fcard-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ── PHONE SHELL ──────────────────────────────────────────── */
.fcp-shell {
  width: 250px;
  background: #060D1F;
  border-radius: 46px;
  padding: 12px 12px 0;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.07),
    0 0 0 9px var(--color-navy),
    0 0 0 10px rgba(255,255,255,0.04),
    0 32px 64px rgba(11,31,75,0.35);
}

.fcp-notch {
  width: 80px; height: 6px;
  background: #000;
  border-radius: 3px;
  margin: 0 auto 10px;
}

.fcp-screen {
  background: #080C14;
  border-radius: 32px 32px 0 0;
  overflow: hidden;
  padding: 14px 12px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

/* ── PHONE NAV ────────────────────────────────────────────── */
.fcp-nav {
  display: flex;
  justify-content: space-around;
  padding: 10px 0 14px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 16px;
}
.fcp-nav span { opacity: 0.3; }
.fcp-nav .fcp-nav--active { opacity: 1; }

/* ── SHARED SCREEN HEADER ─────────────────────────────────── */
.fcp-screen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.fcp-screen-title { font-size: 14px; font-weight: 800; color: #fff; }
.fcp-screen-sub {
  font-size: 9px; color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.06);
  padding: 3px 8px; border-radius: 50px;
}

/* ── SCREEN 1: CHAT ───────────────────────────────────────── */
.fcp-chat-header {
  display: flex; align-items: center; gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 12px;
}
.fcp-ai-avatar {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, #1A6BFF, #00C853);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.fcp-ai-name { font-size: 12px; font-weight: 800; color: #fff; }
.fcp-ai-status {
  display: flex; align-items: center; gap: 4px;
  font-size: 9px; color: rgba(255,255,255,0.4); margin-top: 2px;
}
.fcp-status-dot {
  width: 5px; height: 5px; border-radius: 50%; background: #00C853;
}
.fcp-messages {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; margin-bottom: 10px;
}
.fcp-msg { display: flex; }
.fcp-msg--user { justify-content: flex-end; }
.fcp-msg--ai   { justify-content: flex-start; }
.fcp-bubble {
  max-width: 82%; padding: 8px 11px;
  font-size: 11px; line-height: 1.5;
}
.fcp-bubble--user {
  background: linear-gradient(135deg, #1A6BFF, #0052CC);
  border-radius: 14px 14px 4px 14px; color: #fff;
}
.fcp-bubble--ai {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px 14px 14px 14px;
  color: rgba(255,255,255,0.85);
}
.fcp-bubble--ai strong { color: #00C853; }
.fcp-input-bar {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50px; padding: 8px 14px;
  font-size: 10px; color: rgba(255,255,255,0.25);
  margin-top: auto;
}

/* ── SCREEN 2: CATEGORIES ─────────────────────────────────── */
.fcp-cats { display: flex; flex-direction: column; gap: 8px; }
.fcp-cat {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,0.03); border-radius: 12px;
  padding: 9px 10px; border: 1px solid rgba(255,255,255,0.05);
}
.fcp-cat-icon {
  width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.fcp-cat-info { flex: 1; min-width: 0; }
.fcp-cat-name { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.8); margin-bottom: 5px; }
.fcp-cat-bar-wrap { height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.fcp-cat-bar { height: 100%; border-radius: 2px; }
.fcp-cat-amt { font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; }

/* ── SCREEN 3: PLANNED PAYMENTS ───────────────────────────── */
.fcp-pay-summary { display: flex; gap: 6px; margin-bottom: 12px; }
.fcp-pay-stat { flex: 1; border-radius: 10px; padding: 8px 6px; text-align: center; }
.fcp-pay-num { font-size: 17px; font-weight: 900; line-height: 1; margin-bottom: 3px; }
.fcp-pay-lbl { font-size: 8px; color: rgba(255,255,255,0.4); font-weight: 600; }
.fcp-pay-list { display: flex; flex-direction: column; gap: 4px; }
.fcp-pay-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px; background: rgba(255,255,255,0.03);
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.05);
}
.fcp-pay-info { flex: 1; }
.fcp-pay-name { font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.8); margin-bottom: 2px; }
.fcp-pay-amt { font-size: 12px; font-weight: 800; color: #fff; }
.fcp-toggle {
  width: 32px; height: 18px; border-radius: 9px;
  background: rgba(255,255,255,0.1); position: relative; flex-shrink: 0;
}
.fcp-toggle::after {
  content: ''; position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.35); top: 2px; left: 2px;
  transition: transform 0.2s, background 0.2s;
}
.fcp-toggle--on { background: rgba(0,200,83,0.3); }
.fcp-toggle--on::after { transform: translateX(14px); background: #00C853; }

/* ── SCREEN 4: SAVING GOALS ───────────────────────────────── */
.fcp-goal-ring { display: flex; justify-content: center; margin: 4px 0 12px; }
.fcp-goal-rows {
  background: rgba(255,255,255,0.03); border-radius: 12px;
  padding: 12px; border: 1px solid rgba(255,255,255,0.05);
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px;
}
.fcp-goal-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.fcp-goal-row:last-child { border-bottom: none; padding-bottom: 0; }
.fcp-goal-lbl { font-size: 10px; color: rgba(255,255,255,0.4); }
.fcp-goal-val { font-size: 12px; font-weight: 800; color: #fff; }
.fcp-goal-tip {
  font-size: 10px; color: rgba(255,255,255,0.35); text-align: center;
  background: rgba(255,255,255,0.03); border-radius: 8px;
  padding: 7px; border: 1px solid rgba(255,255,255,0.05);
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .fcard {
    max-width: calc(100% - 32px);
  }
  .fcard-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 32px;
    min-height: auto;
  }
  .fcard-right { display: none; }
}

@media (max-width: 600px) {
  .fcard {
    max-width: calc(100% - 24px);
    border-radius: 28px;
    margin-bottom: 20px;
  }
  .fcard-title { font-size: 26px; }
  .fcard-inner { padding: 40px 24px; }
}