/* === ai-spark — Professional Dark Theme === */

:root {
  --bg: #0E0E10;
  --card: #141416;
  --card-hover: #1A1A24;
  --text: #F1F1F6;
  --text-secondary: #9494A8;
  --text-muted: #5C5C6E;
  --accent: #06B6D4;
  --accent-hover: #22D3EE;
  --gold: #F59E0B;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --shadow: 0 8px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-w: 1120px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* === Typography === */
h1, h2, h3, h4 { line-height: 1.25; }
h1 { font-size: clamp(32px, 4vw, 52px); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 2.8vw, 36px); font-weight: 600; margin-bottom: 8px; }
h3 { font-size: 17px; font-weight: 600; }
p { color: var(--text-secondary); }
a { color: var(--text); text-decoration: none; transition: 0.2s; }
a:hover { color: var(--accent); }

.section-title { margin-bottom: 8px; }
.section-subtitle { color: var(--text-secondary); font-size: 14px; max-width: 520px; margin: 0 auto 40px; }

/* === Header === */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,16,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { font-weight: 700; font-size: 17px; color: var(--accent); letter-spacing: 0.02em; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--text-secondary); font-size: 13px; font-weight: 500; padding: 6px 14px; border-radius: 6px; }
.nav a:hover { color: var(--text); background: rgba(6,182,212,0.06); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.phone-link { color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.phone-link:hover { color: var(--text); }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 12px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; text-decoration: none; transition: 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(6,182,212,0.3); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 20px rgba(6,182,212,0.4); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--border-hover); background: var(--card-hover); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { padding: 14px 32px; font-size: 15px; }

/* === Hero === */
.hero { padding: 100px 0 40px; text-align: center; }
.hero h1 { margin-bottom: 12px; max-width: 760px; margin-left: auto; margin-right: auto; }
.hero .hero-sub { font-size: 16px; max-width: 480px; margin: 0 auto 8px; }
.hero .hero-meta { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-cli { display: inline-block; margin-top: 20px; padding: 8px 18px; background: #0A0A0C; border: 1px solid var(--border); border-radius: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--accent); }
.hero-cli .cursor { display: inline-block; animation: blink 1s step-end infinite; color: var(--text-muted); }
@keyframes blink { 0%,45%{opacity:1;} 46%,100%{opacity:0;} }

/* === Section === */
.section { padding: 80px 0; }

/* === Stats Cards === */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; transition: 0.2s; }
.stat-card:hover { border-color: var(--border-hover); }
.stat-value { font-size: 32px; font-weight: 700; color: var(--gold); letter-spacing: -0.02em; }
.stat-label { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* === Card Grid === */
.cards-grid { display: grid; gap: 12px; }
.cards-2 { grid-template-columns: repeat(2,1fr); }
.cards-3 { grid-template-columns: repeat(3,1fr); }
.cards-4 { grid-template-columns: repeat(4,1fr); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; text-align: center; transition: 0.25s;
}
.card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.card:hover .card-icon svg { transform: scale(1.1) rotate(-5deg); filter: drop-shadow(0 0 6px rgba(6,182,212,0.3)); }
.card-icon svg { transition: 0.3s ease; }
.card:hover .card-icon svg { transform: scale(1.1) rotate(-5deg); filter: drop-shadow(0 0 6px rgba(6,182,212,0.3)); }
.card-icon svg { transition: 0.3s ease; }
.card h3 { font-size: 15px; font-weight: 600; margin-top: 12px; margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--text-secondary); }
.card-result { color: var(--gold); font-size: 14px; margin-top: 8px; }
.card-icon { width: 48px; height: 48px; margin: 0 auto; }
.card-photo { width: 100%; max-width: 200px; height: 140px; object-fit: cover; border-radius: 8px; margin: 0 auto 8px; display: block; background: #0A0A0C; }

/* === Case Block === */
.case-block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.case-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--accent); padding: 4px 10px; border: 1px solid var(--accent); border-radius: 4px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.case-chat-mockup { width: 100%; max-width: 400px; margin: 0 auto 20px; border-radius: 8px; background: #0A0A0C; padding: 16px; text-align: left; font-size: 13px; line-height: 1.6; }
.case-chat-mockup .msg-user { color: var(--accent); margin-bottom: 4px; }
.case-chat-mockup .msg-bot { color: var(--text); margin-bottom: 8px; padding-left: 12px; border-left: 2px solid var(--gold); }

/* === Calculator === */
.calc-block { max-width: 480px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.calc-field { margin-bottom: 20px; }
.calc-field label { font-size: 13px; color: var(--text-secondary); display: flex; justify-content: space-between; margin-bottom: 6px; }
.calc-field .value-display { color: var(--gold); font-weight: 700; font-size: 15px; }
.calc-field input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; height: 4px; background: var(--border); border-radius: 2px; outline: none; }
.calc-field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid var(--bg); box-shadow: 0 0 8px rgba(6,182,212,0.4); }
.calc-result-box { text-align: center; padding: 16px; background: var(--bg); border-radius: 8px; margin-top: 8px; }
.calc-result-box .calc-loss { font-size: 24px; font-weight: 700; color: var(--gold); }
.calc-result-box .calc-payback { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.calc-result-box .calc-payback strong { color: var(--accent); }

/* === Testimonials / Logos === */
.logo-strip { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; align-items: center; }
.logo-strip span { font-size: 13px; color: var(--text-muted); font-weight: 500; padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; }

/* === FAQ === */
.faq-list { max-width: 620px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { padding: 18px 0; cursor: pointer; display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; user-select: none; }
.faq-question:hover { color: var(--accent); }
.faq-answer { max-height: 0; overflow: hidden; transition: 0.3s; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 18px; }

/* === Security === */
.security-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.security-list li { font-size: 14px; color: var(--text-secondary); padding: 6px 12px; background: var(--card); border-radius: 8px; list-style: none; }

/* === Integrations === */
.integrations-text { color: var(--text-secondary); font-size: 14px; line-height: 2; text-align: center; }

/* === Checklist === */
.checklist { list-style: none; max-width: 520px; margin: 0 auto; }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-secondary); }
.checklist li:last-child { border-bottom: none; }
.checklist li::before { content: '— '; color: var(--accent); }

/* === Segments === */
.segment-card { text-align: center; }
.segment-name { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.segment-benefit { font-size: 13px; color: var(--text-secondary); }

/* === Reasons === */
.reason-item { padding: 4px 0; font-size: 14px; color: var(--text-secondary); }

/* === Testimonials text === */
.testimonial { margin-bottom: 32px; }
.testimonial-text { font-size: 15px; font-style: italic; color: var(--text); line-height: 1.6; margin-bottom: 6px; }
.testimonial-author { font-size: 13px; color: var(--text-secondary); }

/* === Form === */
.form-block { max-width: 440px; margin: 0 auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.form-block h2 { margin-bottom: 6px; }
.form-block > p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.lead-form { display: grid; gap: 16px; }
.lead-form input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 14px; outline: none; transition: 0.2s;
}
.lead-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(6,182,212,0.12); }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.checkbox-label input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; }
.guarantee-text { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 12px; }

/* === Footer === */
.footer { border-top: 1px solid var(--border); padding: 48px 0; }
.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { font-weight: 600; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer p, .footer a { font-size: 13px; color: var(--text-secondary); }
.footer a:hover { color: var(--text); }
.footer-social { display: flex; gap: 16px; margin-top: 12px; }
.footer-social a { font-size: 13px; }
.footer-badge { margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.footer-bottom { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); text-align: center; font-size: 12px; color: var(--text-muted); }

/* === Chat Widget === */
.chat-trigger { position: fixed; bottom: 24px; right: 24px; z-index: 10000; cursor: pointer; background: transparent; border: none; display: flex; align-items: center; gap: 0; }
.chat-trigger-avatar { width: 52px; height: 52px; transition: 0.2s; position: relative; z-index: 2; }
.chat-trigger:hover .chat-trigger-avatar { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(6,182,212,0.4)); }
.chat-bubble { background: var(--card); border: 1px solid var(--border); border-radius: 40px; color: var(--text); font-weight: 600; padding: 10px 18px; font-size: 13px; white-space: nowrap; position: relative; z-index: 1; margin-left: -14px; padding-left: 26px; transition: 0.3s; }
.chat-trigger:hover .chat-bubble { opacity: 0; transform: translateX(16px); }
.chat-window { position: fixed; bottom: 88px; right: 24px; z-index: 10001; width: 360px; max-height: 480px; height: 480px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: none; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.chat-window.open { display: flex; }
.chat-header { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.chat-header-title { font-size: 14px; font-weight: 600; }
.chat-header-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { max-width: 80%; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 1.5; animation: msgIn 0.2s ease; }
.chat-msg.user { background: var(--accent); color: #fff; align-self: flex-end; }
.chat-msg.bot { background: var(--bg); color: var(--text); align-self: flex-start; }
@keyframes msgIn { from { opacity:0; } to { opacity:1; } }
.chat-typing { display: flex; gap: 4px; padding: 6px 0; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: typing 1.4s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%,60%,100%{opacity:0.3;} 30%{opacity:1;} }
.chat-input-area { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.chat-input-area input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); font-size: 13px; outline: none; }
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area button { padding: 8px 16px; border: none; border-radius: 6px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.chat-footer { padding: 6px 12px; font-size: 11px; color: var(--text-muted); text-align: center; border-top: 1px solid var(--border); }
.chat-clear-btn { background: none; border: none; color: var(--text-muted); font-size: 11px; cursor: pointer; text-decoration: underline; }

/* === Inactivity Popup === */
.inactivity-popup { position: fixed; bottom: 88px; right: 24px; z-index: 9999; width: 300px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); display: none; padding: 20px; box-shadow: var(--shadow); }
.inactivity-popup.open { display: block; animation: popIn 0.2s ease; }
@keyframes popIn { from { opacity:0; } to { opacity:1; } }
.inactivity-popup h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.inactivity-popup p { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.inactivity-popup .popup-close { position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 16px; color: var(--text-muted); cursor: pointer; }
.inactivity-popup .popup-btn { display: block; width: 100%; padding: 8px 12px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text-secondary); text-decoration: none; font-size: 13px; text-align: center; cursor: pointer; transition: 0.2s; }
.inactivity-popup .popup-btn:hover { border-color: var(--accent); color: var(--text); }

/* === Section fade-in === */
.section { opacity: 0; transform: translateY(16px); transition: 0.6s ease; }
.section.visible { opacity: 1; transform: translateY(0); }

/* === Pages === */
.page-header { padding: 40px 0 20px; text-align: center; }
.page-header h1 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; }
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; max-width: 520px; margin: 0 auto; text-align: center; }
.team-card { text-align: center; }
.team-photo { width: 200px; height: 200px; border-radius: var(--radius); background: var(--card); margin: 0 auto 12px; overflow: hidden; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-weight: 600; }
.team-role { font-size: 13px; color: var(--accent); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 640px; margin: 0 auto; }
.contacts-info h3 { font-weight: 600; margin-bottom: 12px; }
.contacts-info p { margin-bottom: 6px; font-size: 14px; color: var(--text-secondary); }
.contacts-info a { color: var(--accent); }

/* === Hamburger === */
.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; background: none; border: none; padding: 8px; }
.hamburger span { display: block; width: 20px; height: 1.5px; background: var(--text); border-radius: 2px; }

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

@media (max-width: 768px) {
  .nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; background: rgba(14,14,16,0.98); flex-direction: column; padding: 16px 24px; border-bottom: 1px solid var(--border); z-index: 49; }
  .nav.open { display: flex; }
  .nav a { font-size: 15px; padding: 12px 0; border-bottom: 1px solid var(--border); border-radius: 0; width: 100%; }
  .nav a:last-child { border-bottom: none; }
  .hamburger { display: flex; }
  .header-actions .phone-link { display: none; }

  .hero { padding: 60px 0 24px; }
  .hero h1 { font-size: 26px; }
  .hero-cli { font-size: 11px; padding: 6px 14px; }

  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .cards-2, .cards-3, .cards-4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }

  .chat-window { width: calc(100vw - 32px); right: 16px; bottom: 80px; height: 400px; }
  .chat-trigger { right: 16px; bottom: 16px; }
  .chat-bubble { display: none; }
  .inactivity-popup { right: 16px; bottom: 80px; width: calc(100vw - 32px); }
  .team-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; text-align: center; gap: 24px; }
  .footer-social { justify-content: center; }
  .case-chat-mockup { max-width: 100%; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); gap: 6px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 26px; }
  .card { padding: 16px; }
}