/*
 * FINXO — Home Page Styles
 */

/* Hero */
.home-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* Тикер статичный + навбар sticky — hero начинается сразу под навбаром */
  padding: 60px 0 80px;
}
.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  /* Оригинал: opacity 0.20 — фон намеренно приглушен, тёмный фон доминирует */
  opacity: 0.20;
  z-index: 0;
}
.home-hero-overlay {
  position: absolute;
  inset: 0;
  /* Оригинал: 135deg, 0.95 → 0.7 → 0.9 — тёмный фон, текст читаем */
  background: linear-gradient(135deg, rgba(8,12,20,0.95) 0%, rgba(8,12,20,0.7) 50%, rgba(8,12,20,0.9) 100%);
  z-index: 1;
}
.home-hero-glow-1 {
  position: absolute;
  top: 25%;
  left: 25%;
  width: 384px;
  height: 384px;
  border-radius: 50%;
  background: #00D4FF;
  opacity: .08;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.home-hero-glow-2 {
  position: absolute;
  bottom: 25%;
  right: 25%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: #7B5EA7;
  opacity: .07;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.home-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: #00D4FF;
  margin-bottom: 24px;
}
.hero-badge svg { width: 12px; height: 12px; }
.hero-h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  color: var(--text-h);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero-h1 .gradient-text {
  background: linear-gradient(135deg, #00D4FF, #7B5EA7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 17px;
  color: rgba(241, 245, 249, 0.65);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(135deg, #00D4FF, #0099BB);
  color: #080C14;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.35);
  transition: all var(--t-med);
}
.btn-hero-primary:hover {
  box-shadow: 0 0 35px rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
}
.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-h);
  transition: all var(--t-med);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.hero-stat-val {
  font-size: 24px;
  font-weight: 800;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: #00D4FF;
  line-height: 1;
}
.hero-stat-lbl {
  font-size: 12px;
  color: rgba(241,245,249,0.45);
  margin-top: 3px;
}

/* AI Chat Widget */
.ai-chat-widget {
  background: rgba(21, 24, 34, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.ai-chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7B5EA7, #00D4FF);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-chat-avatar svg { width: 16px; height: 16px; color: #fff; }
.ai-chat-name { font-size: 13px; font-weight: 700; color: var(--text-h); }
.ai-chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--green);
}
.ai-chat-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s infinite;
}
.ai-chat-messages {
  padding: 16px;
  height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  animation: fadeInUp .3s ease both;
}
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chat-msg.ai .chat-msg-avatar {
  background: linear-gradient(135deg, #7B5EA7, #00D4FF);
}
.chat-msg.user .chat-msg-avatar {
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
}
.chat-msg-avatar svg { width: 14px; height: 14px; color: #fff; }
.chat-msg.user .chat-msg-avatar svg { color: #00D4FF; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 80%;
  color: var(--text-h);
  white-space: pre-line;
}
.chat-msg.ai .chat-bubble {
  background: rgba(123, 94, 167, 0.1);
  border: 1px solid rgba(123, 94, 167, 0.2);
}
.chat-msg.user .chat-bubble {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
}
.ai-chat-input {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.ai-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.ai-chat-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--text-h);
}
.ai-chat-input-row input::placeholder { color: var(--text-m); }
.ai-chat-send {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.3);
  transition: all var(--t);
  flex-shrink: 0;
}
.ai-chat-send.active {
  background: linear-gradient(135deg, #00D4FF, #0099BB);
  color: #080C14;
}
.ai-chat-send svg { width: 14px; height: 14px; }

/* Savings Widget — точно как в оригинале (React AreaChart) */
.savings-widget {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  /* Оригинал: rgba(15,22,35,0.7), border rgba(0,255,136,0.1), backdrop-filter blur(12px) */
  background: rgba(15, 22, 35, 0.7);
  border: 1px solid rgba(0, 255, 136, 0.1);
  backdrop-filter: blur(12px);
}
.savings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.savings-label {
  font-size: 11px;
  color: rgba(232, 237, 245, 0.5);
  display: block;
  margin-bottom: 4px;
}
.savings-amount {
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  color: #00FF88;
  line-height: 1;
}
.savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(0, 255, 136, 0.1);
  color: #00FF88;
  flex-shrink: 0;
}
.savings-badge svg { width: 10px; height: 10px; }
/* SVG AreaChart — заменяет recharts */
.savings-chart-svg {
  width: 100%;
  overflow: visible;
}
.savings-chart-svg svg {
  display: block;
  width: 100%;
  height: 70px;
  overflow: visible;
}
/* Draw-on анимация линии — как в оригинале (recharts анимирует линию слева направо) */
.savings-line {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  transition: stroke-dashoffset 1.4s cubic-bezier(.16,1,.3,1);
}
.savings-fill {
  opacity: 0;
  transition: opacity .8s ease .4s;
}
.savings-dot {
  opacity: 0;
  transition: opacity .3s ease 1.2s;
}
/* Когда savings-widget становится visible — запускаем анимацию */
.savings-widget.visible .savings-line {
  stroke-dashoffset: 0;
}
.savings-widget.visible .savings-fill {
  opacity: 1;
}
.savings-widget.visible .savings-dot {
  opacity: 1;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.product-card {
  padding: 20px;
  border-radius: 20px;
  background: rgba(26, 31, 46, 0.8);
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all var(--t-med);
  text-decoration: none;
  display: block;
}
.product-card:hover {
  border-color: var(--bd-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
.product-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.product-icon svg { width: 22px; height: 22px; }
.product-stat {
  font-size: 22px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  margin-bottom: 2px;
}
.product-stat-lbl {
  font-size: 11px;
  color: var(--text-m);
  margin-bottom: 10px;
}
.product-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-h);
  margin-bottom: 6px;
}
.product-desc {
  font-size: 12.5px;
  color: var(--text-b);
  line-height: 1.55;
}

/* Features Section badge — 'Технологии Finxo' (фиолетовый) */
.features-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  /* Оригинал: rgba(123,94,167,0.1), border rgba(123,94,167,0.25), color #7B5EA7 */
  background: rgba(123, 94, 167, 0.1);
  border: 1px solid rgba(123, 94, 167, 0.25);
  color: #7B5EA7;
  margin-bottom: 24px;
}
.features-badge svg { width: 12px; height: 12px; }

/* Features Section — brain image + list */
.features-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.features-image-wrap {
  position: relative;
  /* Без рамки — изображение во всю ширину колонки */
}
.features-image-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123,94,167,0.35) 0%, rgba(0,212,255,0.15) 60%, transparent 100%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.features-brain-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  display: block;
  /* Нет border-radius, нет рамки — точно как в оригинале */
  filter: drop-shadow(0 0 40px rgba(123,94,167,0.4)) drop-shadow(0 0 80px rgba(0,212,255,0.2));
}
.features-image-badge {
  position: absolute;
  bottom: 16px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(0,255,136,0.12);
  border: 1px solid rgba(0,255,136,0.3);
  font-size: 12.5px;
  font-weight: 700;
  color: #00FF88;
  z-index: 2;
  backdrop-filter: blur(8px);
}

/* Features list */
.features-list { display: flex; flex-direction: column; gap: 12px; }
.feature-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(21, 24, 34, 0.5);
  border: 1px solid rgba(255,255,255,0.04);
  /* Stagger через reveal + transition-delay в JS */
  opacity: 0;
  transform: translateX(30px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1),
              transform .6s cubic-bezier(.16,1,.3,1);
}
.feature-item.visible {
  opacity: 1;
  transform: translateX(0);
}
/* Задержки для stagger — каждый item появляется чуть позже */
.feature-item:nth-child(1) { transition-delay: .05s; }
.feature-item:nth-child(2) { transition-delay: .15s; }
.feature-item:nth-child(3) { transition-delay: .25s; }
.feature-item:nth-child(4) { transition-delay: .35s; }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg { width: 20px; height: 20px; }
.feature-title { font-size: 14px; font-weight: 700; color: var(--text-h); margin-bottom: 4px; }
.feature-desc { font-size: 13px; color: var(--text-b); line-height: 1.55; }

/* CTA Banner */
.cta-banner {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: 60px 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.08) 0%, rgba(123, 94, 167, 0.12) 100%);
  border: 1px solid rgba(0, 212, 255, 0.15);
}
.cta-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .25;
}
.cta-banner-content { position: relative; z-index: 1; }
.cta-banner h2 {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-h);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cta-banner p {
  font-size: 16px;
  color: rgba(241,245,249,0.65);
  margin-bottom: 32px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .home-hero-inner { grid-template-columns: 1fr; }
  .ai-chat-widget { max-width: 500px; }
  .features-section { grid-template-columns: 1fr; gap: 40px; }
  .features-brain-img { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .hero-h1 { font-size: 32px; }
  .cta-banner { padding: 40px 24px; }
  .cta-banner h2 { font-size: 26px; }
  .features-brain-img { max-width: 100%; }
}

/* ============================================================
   PRODUCT ICONS — цвета из CSS-переменных
============================================================ */
.product-icon--credit   { background: var(--product-credit-bg);   border: 1px solid var(--product-credit-bd); }
.product-icon--deposit  { background: var(--product-deposit-bg);  border: 1px solid var(--product-deposit-bd); }
.product-icon--mortgage { background: var(--product-mortgage-bg); border: 1px solid var(--product-mortgage-bd); }
.product-icon--invest   { background: var(--product-invest-bg);   border: 1px solid var(--product-invest-bd); }

/* PRODUCT STATS — цвета из CSS-переменных */
.product-stat--credit   { color: var(--product-credit-color); }
.product-stat--deposit  { color: var(--product-deposit-color); }
.product-stat--mortgage { color: var(--product-mortgage-color); }
.product-stat--invest   { color: var(--product-invest-color); }

/* ============================================================
   FEATURE ICONS — цвета из CSS-переменных
============================================================ */
.feature-icon--1 { background: var(--feat-icon-1-bg); border: 1px solid var(--feat-icon-1-bd); }
.feature-icon--2 { background: var(--feat-icon-2-bg); border: 1px solid var(--feat-icon-2-bd); }
.feature-icon--3 { background: var(--feat-icon-3-bg); border: 1px solid var(--feat-icon-3-bd); }
.feature-icon--4 { background: var(--feat-icon-4-bg); border: 1px solid var(--feat-icon-4-bd); }

/* ============================================================
   SECTION HEADER — заголовок секций
============================================================ */
.section-header { text-align: center; margin-bottom: 36px; }
.section-label--center { justify-content: center; margin-bottom: 12px; }
.section-h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-h);
  margin-bottom: 10px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-b);
}

/* ============================================================
   FEATURES — заголовок и описание
============================================================ */
.features-h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-h);
  margin-bottom: 8px;
}
.features-desc {
  font-size: 15px;
  color: var(--text-b);
  line-height: 1.7;
  margin-bottom: 28px;
}
.btn-features-cta {
  display: inline-flex;
  margin-top: 24px;
}

/* ============================================================
   SECTION PRODUCTS — фон секции
============================================================ */
.section-products-bg {
  background: linear-gradient(180deg, var(--cyan-dim) 0%, transparent 100%);
}

/* ============================================================
   CTA BUTTONS ROW
============================================================ */
.cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
