/* ============================================
   SCENE — CORE FEATURES
   VaaniBank AI — scene-features.css
   ============================================ */

#scene-features {
  background: var(--off-white);
  padding: var(--space-4xl) 0 var(--space-4xl);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
}

.features-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.features-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* features grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
}

/* Feature card - glassmorphic minimalist apple style */
.feature-card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(27, 43, 107, 0.08);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: 
    transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.3s ease,
    background-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Diagonal glass shimmer overlay */
.feature-card::after {
  content: '';
  position: absolute;
  top: 0; left: -110%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
  pointer-events: none;
}

/* Micro glow & lift hover effects per index (Light Mode) */
.feature-card:hover {
  transform: translateY(-8px) scale(1.025);
  background: var(--white);
}

.feature-card:hover::after {
  left: 140%;
}

.feature-card:nth-child(3n+1):hover {
  box-shadow: 0 16px 48px rgba(232, 57, 42, 0.16), 0 1px 2px rgba(232, 57, 42, 0.05);
  border-color: rgba(232, 57, 42, 0.28);
}

.feature-card:nth-child(3n+2):hover {
  box-shadow: 0 16px 48px rgba(27, 43, 107, 0.16), 0 1px 2px rgba(27, 43, 107, 0.05);
  border-color: rgba(27, 43, 107, 0.28);
}

.feature-card:nth-child(3n+3):hover {
  box-shadow: 0 16px 48px rgba(245, 166, 35, 0.16), 0 1px 2px rgba(245, 166, 35, 0.05);
  border-color: rgba(245, 166, 35, 0.28);
}

/* Accent top lines to differentiate features visually */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--navy);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 3;
}

.feature-card:hover::before {
  opacity: 1;
}

/* Accent coloring for card borders/lines on hover */
.feature-card:nth-child(3n+1):hover::before { background: var(--red); }
.feature-card:nth-child(3n+2):hover::before { background: var(--navy-light); }
.feature-card:nth-child(3n+3):hover::before { background: var(--gold); }

/* Premium spring-loaded icon animation */
.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--light-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.18) rotate(6deg);
}

/* Staggered text transforms for 3D parallax feel */
.feature-card-title,
.feature-card-desc,
.feature-tech-pills {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
  position: relative;
  z-index: 2;
}

.feature-card:hover .feature-card-title {
  transform: translateY(-2px);
}

.feature-card:hover .feature-card-desc {
  transform: translateY(-1px);
}

.feature-card-title {
  font-family: var(--font-sora);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

.feature-card-desc {
  font-family: var(--font-dm);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════
   DARK MODE ADAPTABILITY
   ══════════════════════════════════════════════════════════ */
[data-theme="dark"] #scene-features {
  background: #111428;
}

[data-theme="dark"] .feature-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .feature-card::after {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

[data-theme="dark"] .feature-card:hover {
  background: rgba(255, 255, 255, 0.035);
}

/* Glowing Neon Borders & Shadows in Dark Mode */
[data-theme="dark"] .feature-card:nth-child(3n+1):hover {
  box-shadow: 0 20px 50px rgba(232, 57, 42, 0.28), 0 0 0 1px rgba(232, 57, 42, 0.15);
  border-color: rgba(232, 57, 42, 0.4);
}

[data-theme="dark"] .feature-card:nth-child(3n+2):hover {
  box-shadow: 0 20px 50px rgba(42, 63, 143, 0.28), 0 0 0 1px rgba(42, 63, 143, 0.15);
  border-color: rgba(42, 63, 143, 0.4);
}

[data-theme="dark"] .feature-card:nth-child(3n+3):hover {
  box-shadow: 0 20px 50px rgba(245, 166, 35, 0.28), 0 0 0 1px rgba(245, 166, 35, 0.15);
  border-color: rgba(245, 166, 35, 0.4);
}

[data-theme="dark"] .feature-card-title {
  color: #EEF0FA;
}

[data-theme="dark"] .feature-card-desc {
  color: rgba(220, 224, 244, 0.55);
}

[data-theme="dark"] .feature-icon-wrapper {
  background: rgba(255, 255, 255, 0.05);
}

/* ── Responsive breakpoints ── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

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

@media (max-width: 520px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .feature-card {
    padding: 18px;
  }
  .feature-card-title {
    font-size: 1rem;
  }
}

/* Tech Pills styling inside feature cards */
.feature-tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto; /* Push to the bottom of the card */
  padding-top: var(--space-sm, 10px);
}

/* Color-coded and tactile animations for tech pills */
.tech-pill {
  font-family: var(--font-dm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  background: rgba(27, 43, 107, 0.05);
  border: 1px solid rgba(27, 43, 107, 0.08);
  border-radius: var(--radius-sm, 4px);
  color: var(--navy);
  opacity: 0.85;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover over pill itself gives extra bounce */
.tech-pill:hover {
  transform: translateY(-3px) scale(1.08) !important;
  box-shadow: 0 4px 12px rgba(27, 43, 107, 0.12);
}

/* Staggered card hover highlights for pills */
.feature-card:nth-child(3n+1):hover .tech-pill {
  background: rgba(232, 57, 42, 0.06);
  border-color: rgba(232, 57, 42, 0.15);
  color: var(--red);
}
.feature-card:nth-child(3n+1) .tech-pill:hover {
  box-shadow: 0 4px 12px rgba(232, 57, 42, 0.2);
}

.feature-card:nth-child(3n+2):hover .tech-pill {
  background: rgba(42, 63, 143, 0.06);
  border-color: rgba(42, 63, 143, 0.15);
  color: var(--navy-light);
}
.feature-card:nth-child(3n+2) .tech-pill:hover {
  box-shadow: 0 4px 12px rgba(42, 63, 143, 0.2);
}

.feature-card:nth-child(3n+3):hover .tech-pill {
  background: rgba(245, 166, 35, 0.06);
  border-color: rgba(245, 166, 35, 0.15);
  color: var(--gold);
}
.feature-card:nth-child(3n+3) .tech-pill:hover {
  box-shadow: 0 4px 12px rgba(245, 166, 35, 0.2);
}

/* Dark mode overrides for tech pills */
[data-theme="dark"] .tech-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(220, 224, 244, 0.65);
}

[data-theme="dark"] .feature-card:nth-child(3n+1):hover .tech-pill {
  background: rgba(232, 57, 42, 0.12);
  border-color: rgba(232, 57, 42, 0.25);
  color: #ff6b6b;
}

[data-theme="dark"] .feature-card:nth-child(3n+2):hover .tech-pill {
  background: rgba(100, 120, 200, 0.12);
  border-color: rgba(100, 120, 200, 0.25);
  color: #a0b0ff;
}

[data-theme="dark"] .feature-card:nth-child(3n+3):hover .tech-pill {
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.25);
  color: #ffd075;
}

[data-theme="dark"] .feature-card:hover .tech-pill:hover {
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

/* ============================================
   INTERACTIVE FEATURES DETAIL MODAL
   ============================================ */
.features-modal {
  position: fixed;
  inset: 0;
  z-index: 100005; /* Just above standard modals */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.features-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.features-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.features-modal-content {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(27, 43, 107, 0.1);
  border-radius: 28px;
  box-shadow: 
    0 30px 60px rgba(8, 12, 22, 0.15), 
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  padding: 40px;
  width: 90%;
  max-width: 960px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(40px) scale(0.96);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.features-modal.active .features-modal-content {
  transform: translateY(0) scale(1);
}

.features-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--navy);
  opacity: 0.35;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.features-modal-close:hover {
  opacity: 0.9;
  background: rgba(27, 43, 107, 0.05);
  transform: rotate(90deg);
}

/* Header Section */
.features-modal-header-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(27, 43, 107, 0.08);
  padding-bottom: 20px;
}

.features-modal-icon {
  font-size: 2.5rem;
  width: 68px;
  height: 68px;
  background: rgba(27, 43, 107, 0.04);
  border: 1px solid rgba(27, 43, 107, 0.08);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.features-modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.features-modal-badge {
  align-self: flex-start;
  font-family: var(--font-dm);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
}

.features-modal-badge.success {
  background: rgba(46, 213, 115, 0.12);
  border: 1px solid rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.features-modal-title {
  font-family: var(--font-sora);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

/* Body Layout */
.features-modal-body {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

.fm-section-heading {
  font-family: var(--font-sora);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  opacity: 0.5;
  margin-bottom: 12px;
}

.fm-section-desc {
  font-family: var(--font-dm);
  font-size: 0.95rem;
  color: var(--navy);
  opacity: 0.8;
  line-height: 1.6;
}

/* Pipeline Flow */
.fm-pipeline-flow {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 20px;
  margin-top: 20px;
}

.fm-pipeline-flow::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 31px;
  bottom: 10px;
  width: 2px;
  background: rgba(27, 43, 107, 0.08);
}

.fm-pipeline-step {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 2;
  margin-bottom: 24px;
}

.fm-pipeline-step:last-child {
  margin-bottom: 0;
}

.fm-pipeline-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-sora);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.fm-pipeline-step:hover .fm-pipeline-circle {
  background: var(--red);
  transform: scale(1.1);
  box-shadow: 0 0 0 6px rgba(232, 57, 42, 0.15);
}

.fm-pipeline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
}

.fm-pipeline-title {
  font-family: var(--font-sora);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
}

.fm-pipeline-desc {
  font-family: var(--font-dm);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Spec Dashboard */
.fm-metrics-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 30px;
}

.fm-metric-tile {
  background: rgba(27, 43, 107, 0.03);
  border: 1px solid rgba(27, 43, 107, 0.08);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.3s var(--ease-spring);
}

.fm-metric-tile:hover {
  background: rgba(27, 43, 107, 0.06);
  border-color: rgba(27, 43, 107, 0.14);
  transform: translateY(-2px);
}

.fm-metric-label {
  font-family: var(--font-dm);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  opacity: 0.45;
}

.fm-metric-value {
  font-family: var(--font-sora);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

/* Dark mode overrides */
[data-theme="dark"] .features-modal-content {
  background: rgba(18, 22, 44, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 
    0 35px 70px rgba(0, 0, 0, 0.45), 
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .features-modal-close {
  color: #EEF0FA;
}

[data-theme="dark"] .features-modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .features-modal-header-section {
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .features-modal-icon {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .features-modal-title {
  color: #EEF0FA;
}

[data-theme="dark"] .fm-section-heading {
  color: rgba(220, 224, 244, 0.55);
}

[data-theme="dark"] .fm-section-desc {
  color: rgba(220, 224, 244, 0.85);
}

[data-theme="dark"] .fm-pipeline-flow::before {
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .fm-pipeline-circle {
  box-shadow: 0 0 0 4px #12162c;
  background: rgba(255, 255, 255, 0.08);
  color: #EEF0FA;
}

[data-theme="dark"] .fm-pipeline-step:hover .fm-pipeline-circle {
  background: var(--red);
  box-shadow: 0 0 0 6px rgba(232, 57, 42, 0.25);
  color: #fff;
}

[data-theme="dark"] .fm-pipeline-title {
  color: #EEF0FA;
}

[data-theme="dark"] .fm-pipeline-desc {
  color: rgba(220, 224, 244, 0.5);
}

[data-theme="dark"] .fm-metric-tile {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .fm-metric-tile:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .fm-metric-label {
  color: rgba(220, 224, 244, 0.5);
}

[data-theme="dark"] .fm-metric-value {
  color: #EEF0FA;
}

/* ══════════════════════════════════════════════════════════
   CARD 7 — FULL-WIDTH HIGHLIGHT (SaralForm)
   ══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  .features-grid .feature-card:nth-child(7) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 28px;
    padding: 36px 40px;
    background: linear-gradient(135deg, rgba(255,255,255,0.75) 0%, rgba(240,243,255,0.65) 100%);
    border: 1px solid rgba(27, 43, 107, 0.10);
  }

  .features-grid .feature-card:nth-child(7) .feature-icon-wrapper {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
  }

  .features-grid .feature-card:nth-child(7) .feature-card-title {
    font-size: 1.2rem;
  }

  .features-grid .feature-card:nth-child(7) .feature-tech-pills {
    margin-top: 0;
    justify-content: flex-end;
  }

  /* Dark mode variant */
  [data-theme="dark"] .features-grid .feature-card:nth-child(7) {
    background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, rgba(100,120,200,0.04) 100%);
    border-color: rgba(255, 255, 255, 0.08);
  }
}

/* Responsive breakdowns */
@media (max-width: 900px) {
  .features-modal-body {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .features-modal-content {
    padding: 30px 24px;
    border-radius: 24px;
  }
  
  .features-modal-header-section {
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
  }
  
  .features-modal-icon {
    width: 56px;
    height: 56px;
    font-size: 2rem;
  }
}



