/* =============================================
   APEX AI V2 — Global Stylesheet
   Stripe-inspired · Dual Theme · Mobile-first
   ============================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&family=Noto+Serif+SC:wght@400;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Colors - Light Mode (Claude-inspired: warm neutral + clean) */
  --bg: #f9f7f3;
  --bg-alt: #f4f1ec;
  --bg-card: #ffffff;
  --bg-card-hover: #faf8f5;
  --border: #e8e4dc;
  --border-subtle: #eee9e2;

  --text-primary: #1a1816;
  --text-secondary: #4a4643;
  --text-muted: #7a756f;
  --text-inverse: #f9f7f3;

  --accent: #c96442;
  --accent-hover: #b5563a;
  --accent-light: rgba(201, 100, 66, 0.08);
  --accent-glow: rgba(201, 100, 66, 0.15);
  --gold: #8a7245;
  --gold-light: rgba(138, 114, 69, 0.10);

  --success: #3d7a5c;
  --warning: #c4972a;
  --danger: #c94a4a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.10);
  --shadow-accent: 0 4px 16px rgba(201, 100, 66, 0.15);

  --nav-bg: rgba(249,247,243,0.92);
  --footer-bg: #2d2b29;

  /* Spacing */
  --section-py: 96px;
  --container-max: 1180px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.24s;

  /* RGB values for transparent backgrounds */
  --bg-rgb: 249, 247, 243;
  --bg-card-rgb: 255, 255, 255;
  --accent-rgb: 201, 100, 66;
}

[data-theme="dark"] {
  /* Dark mode: deeper navy, same gold text */
  --bg: #121e34;
  --bg-alt: #16243c;
  --bg-card: #1c2c4a;
  --bg-card-hover: #223456;
  --border: #283e60;
  --border-subtle: #1e3350;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #121e34;

  --accent: #0066FF;
  --accent-hover: #0052D4;
  --accent-light: rgba(0, 102, 255, 0.14);
  --accent-glow: rgba(0, 102, 255, 0.35);
  --gold: #E8C97A;
  --gold-light: rgba(232, 201, 122, 0.18);

  --success: #00a878;
  --warning: #d4a017;
  --danger: #e53e3e;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.55);
  --shadow-accent: 0 8px 32px rgba(59,130,246,0.40);

  --nav-bg: rgba(18,30,52,0.92);
  --footer-bg: #0c1524;

  /* RGB values for transparent backgrounds */
  --bg-rgb: 18, 30, 52;
  --bg-card-rgb: 28, 44, 74;
  --accent-rgb: 0, 102, 255;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-top: 16px;
}
.section-header { margin-bottom: 56px; }
.section-header.center { text-align: center; }
.section-header.center .section-subtitle { margin: 16px auto 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
  text-decoration: none;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
  padding: 6px 16px;
  font-size: 13px;
  justify-content: center;
}
.btn-ghost:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

/* ---- Canvas Background ---- */
#bg-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  display: none;
  pointer-events: none;
}
[data-theme="dark"] #bg-canvas {
  display: block;
  opacity: 0.55;
}

/* ---- Light mode: subtle geometric grid (Claude/Notion-inspired) ---- */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
[data-theme="dark"] body::before {
  display: none;
}

/* ---- Fade-up animation ---- */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }
.fade-up-delay-5 { transition-delay: 0.5s; }

/* ====================================================
   NAVBAR
   ==================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease), backdrop-filter var(--duration) var(--ease);
}
.navbar.scrolled {
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.navbar-inner {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-primary);
  border: 2.5px solid #C0392B;
  border-radius: 50px;
  padding: 4px 18px;
  transition: border-color var(--duration);
}
.logo-apex { color: var(--text-primary); }
.logo-dot { color: var(--text-primary); letter-spacing: -0.12em; margin-left: -0.1em; margin-right: -0.1em; font-size: 0.85em; }
.logo-ai { color: var(--text-primary); letter-spacing: 0; }
.logo:hover { text-decoration: none; border-color: #E74C3C; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration);
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.theme-toggle {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--duration), color var(--duration);
}
.theme-toggle:hover { background: var(--accent-light); color: var(--accent); }

.hamburger {
  display: none;
  width: 40px; height: 40px;
  border: none; background: transparent;
  font-size: 22px; color: var(--text-primary);
  align-items: center; justify-content: center;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
}

/* ====================================================
   HERO
   ==================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
  background: transparent;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; right: -100px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: auto;
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 32px;
}
.hero-badge::before { display: none; }
.hero-title {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 20px;
  color: var(--text-primary);
  opacity: 0.85;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  justify-content: center;
}
.stat-item { }
.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero SVG Background Layer */
.hero-bg-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 40px;
}
[data-theme="dark"] .hero-bg-layer {
  opacity: 0.5;
}
.hero-neural-svg {
  width: 100%;
  height: 100%;
  max-width: 900px;
  display: block;
}

/* --- 背景光晕呼吸 --- */
.ambient-layer .a1 { animation: ambientPulse1 4s ease-in-out infinite; }
.ambient-layer .a2 { animation: ambientPulse2 5.5s ease-in-out infinite; }
.ambient-layer .a3 { animation: ambientPulse1 7s ease-in-out infinite 1.5s; }
@keyframes ambientPulse1 {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.08); }
}
@keyframes ambientPulse2 {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

/* --- 主干连线流动 (stroke-dasharray) --- */
.stream {
  stroke-dasharray: 8 12;
  animation: streamFlow 2.8s linear infinite;
}
.stream.s2 { stroke-dasharray: 6 14; animation-duration: 3.5s; animation-direction: reverse; }
.stream.s3 { stroke-dasharray: 10 10; animation-duration: 3.2s; }
.stream.s4 { stroke-dasharray: 10 10; animation-duration: 3.8s; animation-direction: reverse; }
.stream.s5 { stroke-dasharray: 5 15; animation-duration: 2.5s; }
.stream.s6 { stroke-dasharray: 5 15; animation-duration: 2.7s; animation-direction: reverse; }
.stream.s7 { stroke-dasharray: 4 16; animation-duration: 2.2s; }
.stream.s8 { stroke-dasharray: 4 16; animation-duration: 2.3s; animation-direction: reverse; }
@keyframes streamFlow {
  to { stroke-dashoffset: -60; }
}

/* --- 背景次级连线闪烁 --- */
.lines-bg path {
  stroke-dasharray: 4 20;
  animation: bgLineFade 6s ease-in-out infinite;
}
.lines-bg path:nth-child(2) { animation-delay: 0.8s; }
.lines-bg path:nth-child(3) { animation-delay: 1.6s; }
.lines-bg path:nth-child(4) { animation-delay: 2.4s; }
.lines-bg path:nth-child(5) { animation-delay: 0.4s; }
.lines-bg path:nth-child(6) { animation-delay: 1.2s; }
.lines-bg path:nth-child(7) { animation-delay: 2.0s; }
.lines-bg path:nth-child(8) { animation-delay: 2.8s; }
@keyframes bgLineFade {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.45; }
}

/* --- 节点呼吸灯 --- */
.node { transform-origin: center; }
.node-core {
  animation: coreBreath 3s ease-in-out infinite;
  transform-origin: 300px 300px;
}
@keyframes coreBreath {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}
.node-l1 { animation: nodeBreath 4s ease-in-out infinite; }
.node-l1.n1 { animation-delay: 0s; transform-origin: 180px 200px; }
.node-l1.n2 { animation-delay: 1s; transform-origin: 420px 200px; }
.node-l1.n3 { animation-delay: 2s; transform-origin: 180px 400px; }
.node-l1.n4 { animation-delay: 3s; transform-origin: 420px 400px; }
@keyframes nodeBreath {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.node-l2 { animation: nodeBreathSm 5s ease-in-out infinite; }
.node-l2.n5 { animation-delay: 0.3s; transform-origin: 300px 180px; }
.node-l2.n6 { animation-delay: 1.3s; transform-origin: 300px 420px; }
.node-l2.n7 { animation-delay: 2.3s; transform-origin: 160px 300px; }
.node-l2.n8 { animation-delay: 3.3s; transform-origin: 440px 300px; }
@keyframes nodeBreathSm {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.2); }
}
.node-l3 { animation: nodeBreathXs 6s ease-in-out infinite; }
.node-l3.n9 { animation-delay: 0.2s; transform-origin: 100px 120px; }
.node-l3.n10 { animation-delay: 0.7s; transform-origin: 500px 120px; }
.node-l3.n11 { animation-delay: 1.2s; transform-origin: 100px 480px; }
.node-l3.n12 { animation-delay: 1.7s; transform-origin: 500px 480px; }
.node-l3.n13 { animation-delay: 2.2s; transform-origin: 60px 280px; }
.node-l3.n14 { animation-delay: 2.7s; transform-origin: 540px 280px; }
.node-l3.n15 { animation-delay: 0.5s; transform-origin: 60px 340px; }
.node-l3.n16 { animation-delay: 1.0s; transform-origin: 540px 340px; }
.node-l3.n17 { animation-delay: 1.5s; transform-origin: 160px 140px; }
.node-l3.n18 { animation-delay: 2.0s; transform-origin: 440px 140px; }
.node-l3.n19 { animation-delay: 2.5s; transform-origin: 160px 460px; }
.node-l3.n20 { animation-delay: 3.0s; transform-origin: 440px 460px; }
.node-l3.n21 { animation-delay: 3.5s; transform-origin: 300px 100px; }
.node-l3.n22 { animation-delay: 4.0s; transform-origin: 300px 500px; }
@keyframes nodeBreathXs {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.3); }
}

/* --- 流动光点闪烁 --- */
.particle { opacity: 0.8; }
.particle.p1 { animation: particlePulse 3.5s ease-in-out infinite; }
.particle.p2 { animation: particlePulse 4s ease-in-out infinite 0.5s; }
.particle.p3 { animation: particlePulse 4.5s ease-in-out infinite 1s; }
.particle.p4 { animation: particlePulse 5s ease-in-out infinite 1.5s; }
.particle.p5 { animation: particlePulse 3s ease-in-out infinite 0.3s; }
.particle.p6 { animation: particlePulse 3.2s ease-in-out infinite 0.8s; }
.particle.p7 { animation: particlePulse 2.5s ease-in-out infinite 0.2s; }
.particle.p8 { animation: particlePulse 2.8s ease-in-out infinite 0.6s; }
@keyframes particlePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* --- 核心脉冲波纹 --- */
.pulse-ring {
  transform-origin: 300px 300px;
  opacity: 0;
}
.ring-1 { animation: ringExpand 4s ease-out infinite; }
.ring-2 { animation: ringExpand 4s ease-out infinite 1.3s; }
.ring-3 { animation: ringExpand 4s ease-out infinite 2.6s; }
@keyframes ringExpand {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(4.5); opacity: 0; }
}

/* --- 次级脉冲波纹 --- */
.pulse-ring-sm {
  opacity: 0;
}
.sm-1 {
  transform-origin: 180px 200px;
  animation: ringExpandSm 5s ease-out infinite 1s;
}
.sm-2 {
  transform-origin: 420px 400px;
  animation: ringExpandSm 5s ease-out infinite 3s;
}
@keyframes ringExpandSm {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(3.5); opacity: 0; }
}

/* --- 深色模式下增强发光 --- */
.hero-neural-svg { opacity: 0.8; filter: saturate(1.8) contrast(1.2); }
[data-theme="dark"] .hero-neural-svg { opacity: 1; filter: brightness(1.1) saturate(1); contrast(1); }
[data-theme="dark"] .ambient-layer circle { opacity: 0.7; }
[data-theme="dark"] .stream { stroke-width: 2.5; }

/* ====================================================
   LOGO WALL (Marquee)
   ==================================================== */
.logo-wall {
  padding: 64px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.logo-wall-header {
  text-align: center;
  margin-bottom: 12px;
}
.logo-wall-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.logo-wall-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.marquee-track {
  display: flex;
  gap: 0;
  margin-top: 28px;
}
.marquee-row {
  display: flex;
  gap: 20px;
  animation: marquee 40s linear infinite;
  min-width: max-content;
  margin-bottom: 14px;
}
.marquee-row:nth-child(2) { animation-direction: reverse; animation-duration: 38s; }
.marquee-row-reverse { animation-direction: reverse !important; animation-duration: 50s !important; }
.marquee-row:nth-child(3) { animation-duration: 22s; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--duration), color var(--duration);
}
.logo-badge .logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}
/* 统一用彩色Logo，暗色下给图标加白底圆保证可见 */
.logo-badge .logo-icon-dark { display: none !important; }
.logo-badge .logo-icon-light { display: inline-block; }
[data-theme="dark"] .logo-badge .logo-icon-light {
  background: rgba(255,255,255,0.9);
  border-radius: 6px;
  padding: 3px;
}
.logo-badge:hover { border-color: var(--accent); color: var(--accent); }

/* ====================================================
   PAIN POINTS
   ==================================================== */
.pain-points { padding: var(--section-py) 0; /* bg handled by global glass */ }
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-sm);
}
.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-glow);
  background: var(--bg-card-hover);
}
.pain-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 120px; height: 120px;
  background: var(--accent-light);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pain-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.pain-dept {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
}
.pain-text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====================================================
   SOLUTIONS (Tab)
   ==================================================== */
.solutions { padding: var(--section-py) 0; /* bg handled by global glass */ position: relative; overflow: hidden; }
.solutions .container { position: relative; z-index: 1; }

.solutions-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}
.tab-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-align: left;
  transition: all var(--duration) var(--ease);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}
.tab-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.tab-btn.active {
  background: var(--bg-card);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  font-weight: 600;
}
.tab-btn .tab-icon { font-size: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tab-btn .tab-icon svg { width: 28px; height: 28px; }
.tab-btn .tab-label { }
.tab-btn .tab-dept {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 400;
}

.tab-hint, .tab-hint-mobile {
  display: none;
  text-align: center;
  font-size: 13px;
  color: var(--gold);
  margin-top: 8px;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.tab-panels { }
.tab-panel { display: none; animation: tabFadeIn 0.3s var(--ease); }
.tab-panel.active { display: block; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.solution-card-header {
  padding: 36px 40px 28px;
  border-bottom: 1px solid var(--border-subtle);
}
.solution-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}
.solution-name { font-size: 26px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.solution-tagline { font-size: 16px; color: var(--text-secondary); line-height: 1.6; }
.solution-features {
  padding: 28px 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}
.feature-item::before {
  content: '✓';
  width: 22px; height: 22px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.solution-cta {
  padding: 0 40px 36px;
}

/* Mockup */
.solution-mockup {
  margin: 0 40px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}
.mockup-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--border-subtle);
  border-bottom: 1px solid var(--border);
}
.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mockup-dot:nth-child(1) { background: #ff5f56; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #27c93f; }
.mockup-body { padding: 20px; min-height: 100px; }

/* ====================================================
   PROCESS
   ==================================================== */
.process { padding: var(--section-py) 0; }
.process-steps {
  display: flex;
  gap: 0;
  position: relative;
  counter-reset: step;
}
.process-steps::before { display: none; }
.process-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}
.step-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: var(--shadow-accent);
}
.step-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0 8px;
}

/* Process Connection Animation */
.process-lines {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  width: 80%;
  height: 56px;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.pline-base {
  stroke: url(#processLineGrad);
  stroke-width: 2;
  stroke-opacity: 0.2;
  fill: none;
}
.pline-pulse {
  stroke: url(#processLineGrad);
  stroke-width: 3;
  stroke-opacity: 0.85;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 40 168;
  animation: pline-flow 2.2s linear infinite;
}
.pline-pulse-1 { animation-delay: 0s; }
.pline-pulse-2 { animation-delay: 0.45s; }
.pline-pulse-3 { animation-delay: 0.9s; }
.pline-pulse-4 { animation-delay: 1.35s; }

@keyframes pline-flow {
  0%   { stroke-dashoffset: 208; }
  100% { stroke-dashoffset: 0; }
}

.pline-dot {
  fill: var(--accent);
  opacity: 0;
  animation: dot-ping 3s ease-in-out infinite;
}
.pline-dot-1 { animation-delay: 0s; }
.pline-dot-2 { animation-delay: 0.6s; }
.pline-dot-3 { animation-delay: 1.2s; }
.pline-dot-4 { animation-delay: 1.8s; }
.pline-dot-5 { animation-delay: 2.4s; }

@keyframes dot-ping {
  0%, 100% { opacity: 0; r: 3; }
  50%      { opacity: 0.6; r: 5; }
}

/* Step node breathing glow */
.step-num {
  animation: step-breathe 3s ease-in-out infinite;
}
.process-step:nth-child(1) .step-num { animation-delay: 0s; }
.process-step:nth-child(2) .step-num { animation-delay: 0.6s; }
.process-step:nth-child(3) .step-num { animation-delay: 1.2s; }
.process-step:nth-child(4) .step-num { animation-delay: 1.8s; }
.process-step:nth-child(5) .step-num { animation-delay: 2.4s; }

@keyframes step-breathe {
  0%, 100% { box-shadow: var(--shadow-accent), 0 0 0 0 transparent; }
  50%      { box-shadow: var(--shadow-accent), 0 0 18px 4px var(--accent-glow); }
}

/* ====================================================
   CASES
   ==================================================== */
.cases { padding: var(--section-py) 0; /* bg handled by global glass */ }
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-glow);
}
.case-card .btn-ghost {
  display: block;
  text-align: center;
  margin-top: 16px;
}
.case-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
  width: fit-content;
}
.case-client {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.case-desc {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
  flex: 1;
}
.case-metrics {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.metric {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
  display: flex; align-items: center; gap: 4px;
}
.metric::before { content: '↑'; }

/* ====================================================
   COMPARISON TABLE
   ==================================================== */
.comparison { padding: var(--section-py) 0; }
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
}
.th-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 4px;
}
.compare-table th {
  padding: 12px 16px;
  font-size: 16px;
  text-align: center;
  font-weight: 700;
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
}
.compare-table th.apex {
  background: var(--accent);
  color: #fff;
}
.compare-table td {
  padding: 12px 16px;
  font-size: 14px;
  text-align: left;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
}
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-alt);
  border-right: 1px solid var(--border-subtle);
}
.compare-table td:nth-child(2) {
  border-right: 2px solid var(--border);
}
.compare-table td.apex-col {
  background: var(--accent-light);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 15px;
}
.compare-table tr:last-child td { border-bottom: none; }
.check { color: var(--success); font-size: 16px; font-weight: 700; }
.cross { color: var(--text-muted); }

/* ====================================================
   PRICING
   ==================================================== */
.pricing { padding: var(--section-py) 0; /* bg handled by global glass */ }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
}
.price-card {
  background: rgba(var(--bg-card-rgb), 0.08);
  border: 1px solid rgba(var(--bg-card-rgb), 0.15);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--duration) var(--ease);
  position: relative;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.price-card.featured-alt {
  border-color: #e85d3a;
  box-shadow: 0 4px 16px rgba(232, 93, 58, 0.15);
}
.price-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 4px 16px;
  font-size: 12px;
  white-space: nowrap;
}
.price-badge.badge-alt {
  background: linear-gradient(135deg, #e85d3a, #d4a017);
  animation: urgentPulse 2s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 93, 58, 0.4); }
  50% { box-shadow: 0 0 12px 4px rgba(232, 93, 58, 0.2); }
  font-weight: 700;
  white-space: nowrap;
}
.price-name { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.price-val {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
  margin: 12px 0 4px;
}
.price-val span { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.price-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.price-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.price-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.price-item::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}
.price-discount {
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ====================================================
   EMPLOYEE COMPARISON
   ==================================================== */
.employee-compare { padding: var(--section-py) 0; }
.emp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  overflow: hidden;
  overflow: visible;
}
.emp-table th {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
}
.emp-table th.apex-th {
  background: var(--accent);
  color: #fff;
}
.emp-table td {
  padding: 12px 16px;
  font-size: 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-card);
  vertical-align: top;
}
.emp-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-alt);
  width: 80px;
  border-right: 1px solid var(--border-subtle);
}
.emp-table td.emp-bad { color: var(--text-secondary); }
.emp-table td.emp-good { color: var(--text-primary); font-weight: 700; font-size: 15px; background: var(--accent-light); }
.emp-table tr:last-child td { border-bottom: none; }

/* ====================================================
   MISSION / VISION / VALUES
   ==================================================== */
.mission-section { padding: var(--section-py) 0; }
.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}
.mission-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}
html:not([data-theme="dark"]) .mission-card {
  background: rgba(0,0,0,0.02);
  border: 1px solid rgba(0,0,0,0.06);
}
.mission-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}
.mission-icon {
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.mission-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--accent);
}
.mission-card-text {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.9;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.value-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s;
}
html:not([data-theme="dark"]) .value-item {
  background: rgba(0,0,0,0.015);
  border: 1px solid rgba(0,0,0,0.05);
}
.value-item:hover { transform: translateY(-3px); }
.value-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  margin-bottom: 0.5rem;
}
.value-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.value-desc {
  font-size: 0.95rem;
  opacity: 0.75;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .mission-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .values-grid { grid-template-columns: 1fr; gap: 1rem; }
  .mission-card { padding: 1.8rem 1.2rem; }
  .value-item { padding: 1.5rem 1rem; }
}

/* ====================================================
   FOUNDER
   ==================================================== */
.founder { padding: calc(var(--section-py) * 1.2) 0; /* bg handled by global glass */ }
.founder-carousel {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}
.founder-slides { overflow: hidden; }
.founder-slide {
  display: none;
  animation: slideIn 0.5s var(--ease);
  background: linear-gradient(160deg, #f9f5ec 0%, #f0e9d8 40%, #ede4cf 100%);
  border-radius: 4px;
  padding: 36px 48px;
  position: relative;
  box-shadow: 
    0 2px 20px rgba(0,0,0,0.12),
    inset 0 0 80px rgba(180,160,120,0.08);
  border: 1px solid rgba(180,160,120,0.25);
}
/* 信笺左侧红色竖线 */
.founder-slide::before {
  content: '';
  position: absolute;
  left: 40px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: rgba(192,57,43,0.3);
  border-radius: 1px;
}
/* 信笺横线 */
.founder-slide::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 39px,
    rgba(180,160,120,0.12) 39px,
    rgba(180,160,120,0.12) 40px
  );
  pointer-events: none;
  border-radius: 4px;
}
.founder-slide.active { display: block; }
/* 信笺上的文字用深色 */
.founder-slide .founder-quote {
  color: #2c1810;
  position: relative;
  z-index: 1;
}
.founder-slide .founder-sig {
  color: #8b4513;
  position: relative;
  z-index: 1;
}
[data-theme="dark"] .founder-slide {
  background: linear-gradient(160deg, #1e1a14 0%, #221d15 40%, #252018 100%);
  border-color: rgba(180,160,120,0.15);
  box-shadow: 
    0 2px 20px rgba(0,0,0,0.30),
    inset 0 0 80px rgba(180,160,120,0.04);
}
[data-theme="dark"] .founder-slide::before {
  background: rgba(192,57,43,0.25);
}
[data-theme="dark"] .founder-slide::after {
  background: repeating-linear-gradient(
    transparent,
    transparent 39px,
    rgba(180,160,120,0.06) 39px,
    rgba(180,160,120,0.06) 40px
  );
}
[data-theme="dark"] .founder-slide .founder-quote {
  color: #d4c9a8;
}
[data-theme="dark"] .founder-slide .founder-sig {
  color: #c4993d;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.founder-quote {
  font-family: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.8;
  color: var(--text-primary);
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: keep-all;
  padding: 0 8px;
}
.founder-sig {
  display: block;
  margin-top: 32px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  font-style: normal;
  font-family: 'Inter', sans-serif;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}
.carousel-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--duration);
  box-shadow: var(--shadow-sm);
}
.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-accent);
}
.carousel-dots {
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--duration);
  cursor: pointer;
  border: none;
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: var(--radius-pill);
}

/* ====================================================
   SECURITY
   ==================================================== */
.security { padding: var(--section-py) 0; /* bg handled by global glass */ }
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.security-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  gap: 20px;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-sm);
}
.security-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-glow);
}
.security-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 72px; height: 72px;
  background: var(--accent-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.security-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.security-name { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.security-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* ====================================================
   FOOTER CTA
   ==================================================== */
.footer-cta {
  padding: calc(var(--section-py) * 1.1) 0;
  background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
  text-align: center;
}
.footer-cta-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.footer-cta-sub {
  font-size: 20px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 40px;
}
.footer-cta .btn-cta {
  background: #fff;
  color: var(--accent);
  border: none;
  padding: 18px 48px;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(0,0,0,0.20);
  transition: all var(--duration) var(--ease);
  display: inline-flex; align-items: center; gap: 8px;
}
.footer-cta .btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.30);
  text-decoration: none;
}

/* ====================================================
   FOOTER
   ==================================================== */
footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.65);
  padding: 60px 0 40px;
}
.footer-inner {
  margin-bottom: 0;
}
/* CTA Block: brand left + contact right */
.footer-cta-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  max-width: var(--container-max);
  margin: 0 auto;
}
.footer-brand .logo { color: #fff; display: inline-block; }
.footer-brand .logo .logo-apex,
.footer-brand .logo .logo-dot,
.footer-brand .logo .logo-ai { color: #fff; }
.footer-center { text-align: center; flex: 1; }
.footer-slogan { font-size: 18px; font-weight: 600; color: var(--gold); margin-bottom: 8px; }
.footer-tagline { font-size: 15px; color: rgba(255,255,255,0.65); line-height: 1.6; margin-bottom: 12px; }
.footer-vision { font-size: 16px; font-weight: 600; color: var(--accent); margin-top: 8px; }
.footer-contact-block {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-shrink: 0;
}
.footer-contact-info { display: flex; flex-direction: column; gap: 6px; }
.footer-contact-item { font-size: 14px; margin-bottom: 4px; }
.footer-contact-item a { color: rgba(255,255,255,0.75); }
.footer-contact-item a:hover { color: #fff; }

/* Nav strip */
.footer-nav-strip {
  padding: 28px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-nav-inner {
  display: flex;
  gap: 64px;
  max-width: var(--container-max);
  margin: 0 auto;
  justify-content: center;
}
.footer-nav-group h4 { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-nav-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav-links a { font-size: 14px; color: rgba(255,255,255,0.50); transition: color var(--duration); }
.footer-nav-links a:hover { color: #fff; text-decoration: none; }

footer h4 { color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: center;
}
.back-to-top-wrap {
  text-align: center;
  padding: 20px 0 8px;
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  transition: all var(--duration) var(--ease);
}
.back-to-top:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
  text-decoration: none;
  align-items: center;
  font-size: 13px;
}
.qr-img {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 12px;
}

/* ====================================================
   COUNTER
   ==================================================== */
.counter { font-variant-numeric: tabular-nums; }

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 1024px) {
  .solutions-layout { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .tab-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .tab-nav .tab-btn:first-child {
    grid-column: 1 / -1;
    justify-content: center;
    font-size: 15px;
    padding: 16px 20px;
  }
  .footer-cta-block { flex-direction: column; gap: 32px; }
  .footer-nav-inner { flex-direction: column; gap: 24px; }
}

@media (max-width: 768px) {
  :root { --section-py: 60px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero { padding: 100px 24px 60px; }
  .hero-subtitle { display: none; }
  .tab-btn { 
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius) !important;
    background: var(--bg-card) !important;
    padding: 16px 14px !important;
    font-size: 16px !important;
    justify-content: center;
  }
  .tab-btn .tab-icon svg { width: 32px !important; height: 32px !important; }
  .tab-btn .tab-label { font-size: 16px; }
  .tab-btn .tab-dept { font-size: 13px; }
  .tab-btn.active { border-color: var(--accent) !important; }
  .tab-hint { display: none !important; }
  .tab-hint-mobile { display: block !important; }

  /* Tab nav: 5 pills in one horizontal row */
  .tab-nav {
    display: flex !important;
    flex-direction: row !important;
    gap: 4px !important;
    padding-bottom: 0;
    margin-bottom: 0;
    flex-wrap: nowrap !important;
    overflow: visible;
  }
  .tab-nav .tab-btn:first-child { grid-column: auto !important; }
  .tab-btn {
    padding: 6px 2px !important;
    flex-direction: column !important;
    gap: 2px !important;
    text-align: center !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    border-radius: 10px !important;
    align-items: center;
    justify-content: center;
    border-width: 1.5px !important;
    transition: all 0.15s ease !important;
  }
  .tab-btn:active {
    transform: scale(0.95) !important;
    background: var(--accent-light) !important;
  }
  .tab-btn.active {
    border-color: var(--accent) !important;
    background: var(--accent-light) !important;
    color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--accent-glow) !important;
  }
  .tab-btn .tab-icon svg { width: 18px !important; height: 18px !important; }
  .tab-btn .tab-label { font-size: 11px !important; white-space: nowrap; }
  .tab-btn .tab-dept { display: none; }

  /* Solution panels: tight to tabs, no overflow */
  .tab-panels { margin-top: 0 !important; overflow-x: auto !important; }
  .tab-panel { overflow: hidden !important; max-width: 100vw; }
  .solution-card { overflow: hidden !important; }
  .solution-card-header { padding: 16px !important; }
  .solution-name { font-size: 18px !important; margin-bottom: 6px !important; }
  .solution-tagline { font-size: 13px !important; }
  .solution-mockup { margin: 0 12px 12px !important; }
  .solution-features { padding: 12px 16px 16px !important; gap: 8px !important; }
  .feature-item { font-size: 13px !important; }
  .solution-cta { padding: 0 16px 16px !important; }
  .solution-cta .btn { font-size: 13px !important; padding: 10px 20px !important; }
  .mockup-body { padding: 12px !important; overflow: hidden !important; }
  .mockup-body * { max-width: 100% !important; overflow: hidden; box-sizing: border-box; }
  .mockup-body div[style*="display:flex"] { flex-wrap: wrap; }
  .mockup-header { padding: 8px 12px !important; }

  /* Solutions: swipeable panels */
  .solutions-layout { position: relative; }
  .tab-panels {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .tab-panels::-webkit-scrollbar { display: none; }
  .tab-panel {
    display: block !important;
    min-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    animation: none !important;
    box-sizing: border-box;
  }

  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .pain-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; gap: 16px; }
  .price-card.featured { transform: none; }
  .price-card { text-align: center; padding: 28px 20px; }
  .diagnostic-list { grid-template-columns: 1fr; }
  .price-items { align-items: flex-start; width: fit-content; margin: 0 auto; }
  .price-item { justify-content: flex-start; text-align: left; }
  .security-grid { grid-template-columns: 1fr; }
  .compare-table, .emp-table { font-size: 13px; }
  .compare-table th, .compare-table td,
  .emp-table th, .emp-table td { padding: 10px 8px; }
  .compare-table td:first-child,
  .compare-table th:first-child,
  .emp-table td:first-child,
  .emp-table th:first-child { min-width: 56px; white-space: nowrap; font-size: 12px; padding: 10px 6px; }
  .compare-table, .emp-table { min-width: 0; width: 100%; font-size: 12px; }
  .compare-table th, .compare-table td,
  .emp-table th, .emp-table td { padding: 8px 6px; word-break: break-word; }
  .comparison, .employee-compare { overflow-x: hidden; }
  .comparison .container, .employee-compare .container { overflow: visible !important; min-width: 0; }
  .process-steps { flex-direction: column; gap: 40px; position: relative; }
  .process-steps::before {
    display: block;
    content: '';
    position: absolute;
    left: 50%;
    top: 30px;
    height: calc(100% - 180px);
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--gold), var(--accent), transparent);
    opacity: 0.4;
    transform: translateX(-50%);
    z-index: 0;
  }
  .process-lines { display: none !important; }
  .process-steps { overflow: hidden; }
  .step { position: relative; z-index: 1; }
  .step-num { position: relative; z-index: 2; }
  .step-num { animation: none; }
  .footer-cta-block { flex-direction: column; align-items: center; text-align: center; gap: 28px; }
  .footer-center { text-align: center; }
  .footer-contact-block { flex-direction: column; align-items: center; }
  .footer-nav-inner { flex-direction: column; gap: 20px; text-align: center; }
  .footer-nav-links { justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  /* Solution card overflow handled in tab section above */

  /* ====== MOBILE OPTIMIZATION — Compact & Focused ====== */

  /* Section spacing tighter */
  :root { --section-py: 48px; }
  .section-title { font-size: 24px; }
  .section-subtitle { font-size: 14px; }

  /* Prevent layout shift on load */
  .hero { min-height: 100vh; min-height: 100dvh; }

  /* Chinese text: no orphan lines */
  .founder-quote { word-break: break-all; overflow-wrap: break-word; }
  .pain-text, .method-desc, .step-desc, .case-desc,
  .price-desc, .price-item, .diagnostic-desc { text-align: left; }

  /* Pain points: compact 2-col grid, smaller cards */
  .pain-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px;
  }
  .pain-card {
    padding: 12px !important;
    gap: 10px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .pain-icon { width: 40px; height: 40px; flex-shrink: 0; }
  .pain-icon img { width: 40px; height: 40px; border-radius: 8px; }
  .pain-dept { font-size: 13px; font-weight: 700; }
  .pain-text { font-size: 12px; line-height: 1.5; }

  /* Solutions: 5 tabs — smaller on narrow screens */
  .tab-btn .tab-icon svg { width: 16px !important; height: 16px !important; }
  .tab-btn .tab-label { font-size: 10px !important; }
  .tab-btn { padding: 5px 1px !important; }
  .solution-card-header { padding: 12px !important; }
  .solution-mockup { margin: 0 8px 8px !important; }
  .solution-features { padding: 10px 12px 12px !important; }
  .solution-cta { padding: 0 12px 12px !important; }

  /* Solutions: swipeable panels on mobile */
  .tab-panels {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .tab-panels::-webkit-scrollbar { display: none; }
  .tab-panel {
    display: block !important;
    min-width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    animation: none !important;
    box-sizing: border-box;
  }
  .tab-hint { display: none !important; }

  /* Solutions: dot indicators */
  .solutions-dots {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
  }
  .solutions-dots .sol-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  .solutions-dots .sol-dot.active {
    background: var(--accent);
    width: 22px;
    border-radius: 4px;
  }

  /* Solutions wrapper */
  .solutions-layout {
    position: relative;
  }

  /* Cases: horizontal swipe carousel */
  .cases-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 16px;
    position: relative;
    scrollbar-width: none;
  }
  .cases-grid::-webkit-scrollbar { display: none; }
  .case-card {
    min-width: 280px;
    max-width: 300px;
    min-height: 280px;
    flex-shrink: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    padding: 20px !important;
    display: flex !important;
  }
  .case-card:nth-child(n+5) { display: flex !important; }
  .case-tag { font-size: 11px; padding: 3px 10px; margin-bottom: 12px; }
  .case-client { font-size: 12px; margin-bottom: 8px; }
  .case-desc { font-size: 13px; line-height: 1.5; flex: 1; }
  .case-metrics { padding: 12px; gap: 10px; }
  .metric { font-size: 12px; }
  .case-card .btn-ghost { font-size: 13px; padding: 10px; }
  /* Cases: swipe hint + dot indicators */
  .cases-swipe-hint {
    display: block !important;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0.7;
  }
  .cases-dots {
    display: flex !important;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
  }
  .cases-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
  }
  .cases-dots .dot.active {
    background: var(--accent);
    width: 20px;
    border-radius: 4px;
  }

  /* Pricing: 2x2 grid, equal height */
  .pricing-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
    align-items: stretch;
  }
  .price-card {
    padding: 20px 16px !important;
    display: flex;
    flex-direction: column;
  }
  .price-card .btn { margin-top: auto; }
  .price-badge { font-size: 10px; padding: 2px 10px; top: -10px; }
  .price-name { font-size: 15px !important; }
  .price-val { font-size: 22px !important; margin: 8px 0 2px !important; }
  .price-val span { font-size: 12px !important; }
  .price-desc { font-size: 12px !important; margin-bottom: 12px !important; }
  .price-item { font-size: 11px !important; gap: 6px !important; }
  .price-items { gap: 6px !important; margin-bottom: 12px !important; flex: 1; }
  .price-card .btn { font-size: 12px !important; padding: 10px 16px !important; }

  /* Security: 2x2 grid, icon+title centered, desc left */
  .security-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px;
    align-items: stretch;
  }
  .security-card {
    padding: 16px 14px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px !important;
  }
  .security-card .security-icon {
    margin: 0 auto;
    width: 56px;
    height: 56px;
  }
  .security-card .security-name { font-size: 13px; text-align: center; }
  .security-card .security-desc { font-size: 11px; text-align: left; }
  .security-card > div:last-child { width: 100%; }

  /* Comparison tables: smaller text */
  .section-header .section-title { font-size: 20px; }

  /* Process: compact vertical with animated line */
  .process-steps {
    flex-direction: column !important;
    gap: 20px !important;
    overflow: hidden;
    position: relative;
    padding-left: 36px;
  }
  .process-steps::before {
    display: block !important;
    content: '' !important;
    position: absolute !important;
    left: 18px !important;
    top: 22px !important;
    height: calc(100% - 60px) !important;
    width: 2px !important;
    background: linear-gradient(180deg, var(--accent), var(--gold), var(--accent), transparent) !important;
    background-size: 100% 200% !important;
    animation: verticalFlow 3s linear infinite !important;
    opacity: 0.5 !important;
    transform: none !important;
  }
  .process-step {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
  }
  .step-num {
    width: 36px; height: 36px; font-size: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
  }
  .step-name { font-size: 14px; margin-bottom: 2px; }
  .step-desc { font-size: 12px; margin-top: 0; }

  /* Method cards: 2+1 layout (2 top, 1 centered bottom) */
  .method-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    justify-items: center;
  }
  .method-card:last-child {
    grid-column: 1 / -1;
    max-width: 60%;
  }
  .method-card { padding: 16px 12px !important; }
  .method-icon { font-size: 28px; margin-bottom: 6px; line-height: 1; }
  .method-icon svg { width: 28px; height: 28px; }
  .method-name { font-size: 13px; }
  .method-desc { font-size: 11px; }

  /* Founder: tighter */
  .founder-carousel { padding: 24px !important; }

  /* Footer CTA: compact */
  .footer-cta-title { font-size: 24px; }
  .footer-cta-sub { font-size: 15px; }

  /* Employee compare section title */
  .employee-compare .section-title { font-size: 18px; }
  .comparison .section-title { font-size: 18px; }
}

@media (max-width: 768px) {
  .process-steps::before {
    background: linear-gradient(180deg, 
      transparent 0%, var(--accent) 10%, var(--gold) 30%, 
      var(--accent) 50%, var(--gold) 70%, var(--accent) 90%, 
      transparent 100%);
    background-size: 100% 200%;
    animation: verticalFlow 3s linear infinite;
    opacity: 0.5;
  }
  @keyframes verticalFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 200%; }
  }
}
@media (max-width: 480px) {
  .hero-title { font-size: 30px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .founder-quote { font-size: 15px; text-align: left !important; padding: 0 4px; }
  .founder-slide { padding: 28px 24px 28px 32px !important; }
  .founder-slide::before { left: 16px !important; }
  .hero-bg-layer { padding-top: 0; align-items: flex-start; opacity: 0.25; overflow: hidden; }
  .hero-neural-svg { width: 100%; height: auto; max-width: 100%; }
  #bg-canvas { position: fixed; top: 0; left: 0; width: 100vw !important; height: 100vh !important; }
}

/* ====================================================
   METHODOLOGY
   ==================================================== */
.methodology {
  padding: var(--section-py) 0;
  background: var(--bg);
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 32px;
}
.method-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--duration) var(--ease);
}
.method-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.method-icon {
  font-size: 40px;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.method-icon svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.method-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.method-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.method-note {
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
}

/* ====================================================
   AI DIAGNOSTIC
   ==================================================== */
.ai-diagnostic {
  padding: var(--section-py) 0;
}
.diagnostic-inner {
  display: block;
  max-width: 720px;
  background: rgba(var(--bg-card-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb, 37, 99, 235), 0.15);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
}
.diagnostic-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
}
.diagnostic-content {
  padding: 36px 40px;
}
.diagnostic-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.diagnostic-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 520px;
}
.diagnostic-list {
  list-style: none;
  padding: 0;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}
.diagnostic-list li {
  font-size: 15px;
  color: var(--text-secondary);
  padding-left: 28px;
  position: relative;
  line-height: 1.6;
}
.diagnostic-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}
.diagnostic-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
}
.diagnostic-amount {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.diagnostic-note {
  font-size: 14px;
  color: var(--text-muted);
}
.diagnostic-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(var(--accent-rgb, 37, 99, 235), 0.08), rgba(212, 168, 83, 0.08));
  border-left: 1px solid rgba(var(--accent-rgb, 37, 99, 235), 0.15);
}
.diagnostic-badge-inner {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(var(--bg-card-rgb), 0.7);
  border: 2px solid rgba(var(--accent-rgb, 37, 99, 235), 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 30px rgba(var(--accent-rgb, 37, 99, 235), 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.badge-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.badge-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: 0.5px;
}

/* ====================================================
   CHATBOT WIDGET
   ==================================================== */
.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: inherit;
}
.chatbot-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  box-shadow: 0 4px 20px var(--accent-glow), var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
}
.chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e53e3e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.chatbot-window {
  display: none;
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  flex-direction: column;
  overflow: hidden;
}
.chatbot-window.open {
  display: flex;
}
.chatbot-header {
  padding: 16px 20px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  font-family: 'Orbitron', monospace;
}
.chatbot-name {
  font-size: 15px;
  font-weight: 700;
}
.chatbot-status {
  font-size: 12px;
  opacity: 0.8;
}
.chatbot-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}
.chatbot-close:hover { opacity: 1; }
.chatbot-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
  max-height: 340px;
  background: var(--bg);
}
.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
}
.chat-msg.bot {
  align-self: flex-start;
}
.chat-msg.user {
  align-self: flex-end;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.chat-msg.bot .chat-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chatbot-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--bg-card);
}
.chatbot-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.chatbot-input:focus {
  border-color: var(--accent);
}
.chatbot-input::placeholder {
  color: var(--text-muted);
}
.chatbot-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.chatbot-send:hover {
  background: var(--accent-hover);
}

/* ====================================================
   CONTACT MODAL
   ==================================================== */
.contact-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.contact-modal-overlay.open {
  display: flex;
}
.contact-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: modalSlideIn 0.3s var(--ease);
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }
.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.modal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.modal-form-group {
  margin-bottom: 14px;
}
.modal-input, .modal-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-input:focus, .modal-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.modal-input::placeholder, .modal-textarea::placeholder {
  color: var(--text-muted);
}
.modal-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.6;
}
.modal-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  margin-top: 6px;
}
.modal-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

/* ====================================================
   RESPONSIVE (new sections)
   ==================================================== */
@media (max-width: 768px) {
  .method-grid { grid-template-columns: 1fr; }
  .diagnostic-inner { flex-direction: column; padding: 32px 24px; gap: 28px; }
  .diagnostic-badge-inner { width: 120px; height: 120px; }
  .badge-icon { font-size: 28px; }
  .badge-text { font-size: 12px; }
  .chatbot-window { width: calc(100vw - 32px); right: -8px; bottom: 68px; }
  .contact-modal { padding: 28px 20px; }
}

/* Founder Motto */
.founder-motto {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--accent);
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
  opacity: 0.9;
}

/* ====== GLOBAL GLASS EFFECT ====== */
/* Canvas full-page coverage */
#bg-canvas {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* All sections get glass effect — low opacity so canvas particles show through */
section,
.hero,
.solutions,
.method,
.cases,
.security,
.pricing,
.founder,
.cta-final,
.trust-logos,
.pain-points,
.scenarios,
.ai-diagnostic,
.employee-compare,
.process-section,
footer {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* Hero stays fully transparent to show particles clearly */
.hero {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Cards get subtle glass — particles visible through like whitepaper */
/* All cards & containers — near-transparent like whitepaper */
.solution-card,
.security-card,
.pricing-card,
.price-card,
.case-card,
.method-card,
.pain-card,
.scenario-card,
.founder-carousel,
.diagnostic-inner,
.emp-table,
.compare-table,
table,
.method-grid,
.pain-grid,
.cases-grid,
.pricing-grid,
.tab-btn,
.tab-btn:hover,
.tab-btn.active,
.compare-table th,
.compare-table td,
.compare-table td:first-child,
.emp-table th,
.emp-table td,
.emp-table td.emp-good {
  background: rgba(var(--bg-card-rgb), 0.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Dark mode: force table backgrounds transparent */
[data-theme="dark"] .compare-table,
[data-theme="dark"] .emp-table {
  background: rgba(28, 44, 74, 0.08) !important;
}
[data-theme="dark"] .compare-table th,
[data-theme="dark"] .compare-table td,
[data-theme="dark"] .compare-table td:first-child,
[data-theme="dark"] .emp-table th,
[data-theme="dark"] .emp-table td,
[data-theme="dark"] .emp-table td:first-child,
[data-theme="dark"] .emp-table td.emp-good {
  background: rgba(28, 44, 74, 0.08) !important;
}
[data-theme="dark"] .emp-table td.emp-good {
  background: rgba(0, 102, 255, 0.14) !important;
}

/* Keep accent highlights for APEX columns */
[data-theme="dark"] .compare-table th.apex,
[data-theme="dark"] .compare-table td.apex-col,
[data-theme="dark"] .emp-table th.apex-th {
  background: rgba(37, 99, 235, 0.3) !important;
}
.compare-table th.apex,
.compare-table td.apex-col,
.emp-table th.apex-th {
  background: rgba(201, 100, 66, 0.10) !important;
  color: var(--text-primary) !important;
  font-weight: 700;
}
.compare-table th.apex,
.emp-table th.apex-th {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Light mode: cards opaque white — no grid bleed-through */
html:not([data-theme="dark"]) .solution-card,
html:not([data-theme="dark"]) .security-card,
html:not([data-theme="dark"]) .price-card,
html:not([data-theme="dark"]) .case-card,
html:not([data-theme="dark"]) .method-card,
html:not([data-theme="dark"]) .pain-card,
html:not([data-theme="dark"]) .scenario-card,
html:not([data-theme="dark"]) .founder-carousel,
html:not([data-theme="dark"]) .diagnostic-inner,
html:not([data-theme="dark"]) .tab-btn,
html:not([data-theme="dark"]) .compare-table,
html:not([data-theme="dark"]) .emp-table {
  background: #fff !important;
  border: 1px solid #e8e4dc !important;
}
html:not([data-theme="dark"]) .compare-table th,
html:not([data-theme="dark"]) .compare-table td,
html:not([data-theme="dark"]) .compare-table td:first-child,
html:not([data-theme="dark"]) .emp-table th,
html:not([data-theme="dark"]) .emp-table td,
html:not([data-theme="dark"]) .emp-table td.emp-good {
  background: #fff !important;
}
html:not([data-theme="dark"]) .compare-table td:first-child,
html:not([data-theme="dark"]) .emp-table td:first-child {
  background: #f9f7f3 !important;
}
html:not([data-theme="dark"]) .compare-table th:not(.apex),
html:not([data-theme="dark"]) .emp-table th:not(.apex-th) {
  background: #f4f1ec !important;
}
html:not([data-theme="dark"]) .compare-table th.apex,
html:not([data-theme="dark"]) .emp-table th.apex-th {
  background: var(--accent) !important;
  color: #fff !important;
}
[data-theme="dark"] .solution-card,
[data-theme="dark"] .security-card,
[data-theme="dark"] .price-card,
[data-theme="dark"] .case-card,
[data-theme="dark"] .method-card,
[data-theme="dark"] .pain-card,
[data-theme="dark"] .scenario-card,
[data-theme="dark"] .founder-carousel,
[data-theme="dark"] .diagnostic-inner,
[data-theme="dark"] .tab-btn {
  background: rgba(var(--bg-card-rgb), 0.08) !important;
  border: 1px solid rgba(var(--bg-card-rgb), 0.15) !important;
}

/* Navbar stays as-is (already has its own glass) */
.navbar {
  z-index: 1000;
}

/* Footer stays opaque */
footer,
.footer {
  background: var(--footer-bg) !important;
  backdrop-filter: none !important;
  position: relative;
  z-index: 1;
}

/* Ensure buttons and interactive elements are clickable */
a, button, input, select, textarea, .btn, .nav-links, .nav-actions {
  position: relative;
  z-index: 2;
}

/* Hover float effect for all clickable cards/links to secondary pages */
.price-card,
.tab-btn,
.logo-badge,
.footer-nav-links a,
.solution-card a,
.scenario-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3) !important;
}
.tab-btn:hover {
  transform: translateY(-2px);
}
.footer-nav-links a:hover {
  transform: translateY(-2px);
  display: inline-block;
}
