/* Data.kz — Банктік Клиент Талдауы */
:root {
  --bg-primary: #1A1A1A;
  --bg-secondary: #2B2B2B;
  --bg-card: rgba(43, 43, 43, 0.92);
  --accent: #D97706;
  --accent-2: #F59E0B;
  --accent-gradient: linear-gradient(135deg, #D97706, #F59E0B);
  --text-primary: #F8F6F2;
  --text-secondary: rgba(229, 224, 216, 0.7);
  --text-muted: rgba(229, 224, 216, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --success: #22C77A;
  --warning: #F59E0B;
  --danger: #F05A5A;
  --text-on-accent: #ffffff;
  --link-hover: #F59E0B;
  --header-bg: rgba(26, 26, 26, 0.85);
  --header-bg-solid: rgba(26, 26, 26, 0.98);
  --accent-glow: rgba(217, 119, 6, 0.35);
  --accent-soft: rgba(217, 119, 6, 0.1);
  --accent-soft-hover: rgba(217, 119, 6, 0.05);
  --accent-border-hover: rgba(217, 119, 6, 0.4);
  --accent-ring: rgba(217, 119, 6, 0.2);
  --accent-mesh-1: rgba(217, 119, 6, 0.12);
  --accent-mesh-2: rgba(245, 158, 11, 0.1);
  --chat-panel-bg: rgba(43, 43, 43, 0.95);
  --faq-answer-bg: rgba(43, 43, 43, 0.5);
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --success-bg: rgba(34, 199, 122, 0.08);
  --warning-bg: rgba(245, 158, 11, 0.08);
  --danger-bg: rgba(240, 90, 90, 0.08);
  --warning-banner-bg: rgba(245, 158, 11, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --font-main: 'Inter', sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --header-h: 72px;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }

img, svg { max-width: 100%; display: block; }

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-nav a {
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.main-nav a:hover { color: var(--text-primary); }

.main-nav a.active {
  color: var(--text-primary);
  font-weight: 600;
}

.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 2px;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-grid h4 {
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.footer-grid p, .footer-grid a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.35rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.social-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent-border-hover);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-on-accent);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 2rem) 0 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 40%, var(--accent-mesh-1), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, var(--accent-mesh-2), transparent),
    var(--bg-primary);
}

#hero-canvas, #particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero .lead {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.pulse-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  pointer-events: none;
  z-index: 1;
}

.pulse-ring {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent-ring);
  border-radius: 50%;
  animation: pulse-expand 4s ease-out infinite;
}

.pulse-ring:nth-child(2) { animation-delay: 1.3s; }
.pulse-ring:nth-child(3) { animation-delay: 2.6s; }

@keyframes pulse-expand {
  0% { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  text-align: center;
  padding: 2rem 1.25rem;
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card .stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Bank cards */
.bank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.bank-card .bank-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  border-radius: 12px;
  padding: 8px;
  object-fit: contain;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.bank-card h3 {
  font-family: var(--font-display);
  margin-bottom: 0.75rem;
}

.bank-card .metrics {
  list-style: none;
  margin: 1rem 0;
}

.bank-card .metrics li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.bank-card .metrics li strong { color: var(--text-primary); }

/* Churn formula */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.step-card {
  text-align: center;
  position: relative;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.formula-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--accent);
}

/* AI illustrations */
.illustration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.illustration-item {
  text-align: center;
}

.illustration-item svg {
  width: 100%;
  height: 180px;
  margin-bottom: 1rem;
}

.illustration-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* About page */
.prose {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.85;
}

.prose p { margin-bottom: 1.25rem; }

.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data-table th,
table.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.data-table th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

table.data-table th:hover { background: var(--accent-soft); }

table.data-table th.sorted-asc::after { content: ' ↑'; color: var(--accent); }
table.data-table th.sorted-desc::after { content: ' ↓'; color: var(--accent); }

table.data-table tbody tr:hover {
  background: var(--accent-soft-hover);
}

.churn-cell {
  font-weight: 600;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  display: inline-block;
}

.churn-cell.churn-good { color: var(--success); background: var(--success-bg); }
.churn-cell.churn-medium { color: var(--warning); background: var(--warning-bg); }
.churn-cell.churn-bad { color: var(--danger); background: var(--danger-bg); }

.year-note {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  vertical-align: middle;
}

/* Timeline */
.timeline-scroll {
  overflow-x: auto;
  padding: 1rem 0 2rem;
  -webkit-overflow-scrolling: touch;
}

.timeline {
  display: flex;
  gap: 1.25rem;
  min-width: max-content;
  padding: 0 0.5rem;
}

.timeline-item {
  flex: 0 0 280px;
  position: relative;
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Authors */
.author-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.author-card .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 1rem;
  display: block;
}

/* Analytics */
.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.table-controls input,
.table-controls select {
  min-width: 160px;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.table-controls input {
  flex: 1;
  min-width: 200px;
}

.table-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
}

.filter-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  min-height: 0;
}

.filter-badges:empty {
  display: none;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.filter-badge button {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.filter-badge button:hover {
  color: var(--danger);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.chart-card {
  padding: 1.25rem;
}

.chart-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.chart-wrap {
  position: relative;
  height: 400px;
}

.calculator-form {
  display: grid;
  gap: 1rem;
  max-width: 480px;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.calc-result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: none;
}

.calc-result.visible { display: block; }

.calc-result.good { border-color: var(--success); background: var(--success-bg); }
.calc-result.medium { border-color: var(--warning); background: var(--warning-bg); }
.calc-result.bad { border-color: var(--danger); background: var(--danger-bg); }

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.insight-card .icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

/* AI Tools */
.neural-avatar {
  width: 100%;
  max-width: 400px;
  height: 400px;
  margin: 0 auto 1rem;
  position: relative;
}

.neural-avatar canvas {
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
}

.neural-label {
  text-align: center;
  font-family: var(--font-display);
  color: var(--accent);
}

/* Chatbot */
.chat-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: var(--text-on-accent);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1100;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.2s;
}

.chat-fab:hover { transform: scale(1.08); }

.chat-panel {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: min(380px, calc(100vw - 48px));
  height: 520px;
  background: var(--chat-panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: none;
  flex-direction: column;
  z-index: 1100;
  box-shadow: var(--shadow);
}

.chat-panel.open { display: flex; }

.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 { font-size: 1rem; }

.chat-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
}

.chat-suggestions {
  padding: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.chat-suggestions button {
  font-size: 0.75rem;
  padding: 0.4rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}

.chat-suggestions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: var(--text-on-accent);
}

.chat-msg.bot {
  align-self: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.chat-msg.loading {
  align-self: flex-start;
  color: var(--text-muted);
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-input-row input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.api-key-banner {
  padding: 0.5rem 0.75rem;
  background: var(--warning-banner-bg);
  border-bottom: 1px solid var(--warning);
  font-size: 0.75rem;
  color: var(--warning);
}

.api-key-banner button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* Insight generator */
.insight-output {
  margin-top: 1.5rem;
  min-height: 80px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1rem auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Audio player */
.audio-player {
  padding: 1.5rem;
}

.audio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.audio-viz {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.volume-slider {
  width: 120px;
  accent-color: var(--accent);
}

/* Data panel animation */
.data-panel {
  position: relative;
  padding: 3rem 0;
  overflow: hidden;
}

.animated-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  height: 200px;
  margin: 2rem 0;
}

.animated-bars .bar {
  width: 24px;
  background: var(--accent-gradient);
  border-radius: 4px 4px 0 0;
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.animated-bars.animate .bar {
  transform: scaleY(1);
}

.data-flow-line {
  height: 2px;
  background: var(--accent-gradient);
  width: 0;
  margin: 1rem auto;
  transition: width 2s ease;
}

.data-flow-line.animate { width: 80%; }

.floating-labels {
  position: relative;
  height: 60px;
}

.floating-label {
  position: absolute;
  font-size: 0.75rem;
  color: var(--accent);
  opacity: 0;
  animation: float-label 3s ease-in-out infinite;
}

@keyframes float-label {
  0%, 100% { opacity: 0; transform: translateY(10px); }
  50% { opacity: 1; transform: translateY(-10px); }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-form .form-group { margin-bottom: 1rem; }

.form-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.visible { display: block; }

.toast {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  right: 24px;
  padding: 1rem 1.5rem;
  background: var(--success);
  color: var(--text-on-accent);
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 1200;
  transform: translateX(120%);
  transition: transform 0.4s ease;
}

.toast.show { transform: translateX(0); }

.map-svg {
  width: 100%;
  max-height: 400px;
}

.map-frame {
  padding: 1rem;
  overflow: hidden;
}

.map-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: calc(var(--radius) - 4px);
  display: block;
}

.map-marker {
  animation: marker-pulse 2s ease infinite;
}

@keyframes marker-pulse {
  0%, 100% { r: 8; opacity: 1; }
  50% { r: 12; opacity: 0.6; }
}

/* FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: none;
  color: var(--text-primary);
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--faq-answer-bg);
}

.faq-answer p {
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-item.open .faq-answer { max-height: 300px; }

.faq-item.open .faq-icon { transform: rotate(180deg); }

.faq-icon { transition: transform 0.3s; }

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  border: none;
  color: var(--text-on-accent);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modal API key */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 440px;
  width: 100%;
}

.modal h3 { margin-bottom: 1rem; }

.modal p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; }

.modal input {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.page-hero {
  padding: calc(var(--header-h) + 3rem) 0 2rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.page-hero p { color: var(--text-secondary); }

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--header-bg-solid);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.3s;
    pointer-events: none;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
  }

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

  .chat-panel {
    left: 12px;
    right: 12px;
    width: auto;
  }

  .chat-fab { left: 12px; }
}

@media (max-width: 480px) {
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; }
}
