/* ============================================
   中科灵犀 LINGXI TECH - Design System v2
   ============================================ */

:root {
  --deep-space: #0A1628;
  --navy: #1B2D4F;
  --brand-blue: #1E56A0;
  --brand-blue-light: #3B7DD8;
  --brand-blue-glow: rgba(59, 125, 216, 0.15);
  --matte-gray: #8B9DAF;
  --soft-sand: #E8DED1;
  --warm-white: #F7F4F0;
  --pure-white: #FFFFFF;
  --gold: #C4A35A;
  --copper-green: #5C8A6F;
  --text-primary: #1A1F2E;
  --text-secondary: #5A6577;
  --text-muted: #8B9DAF;
  --bg-dark: #0A1628;
  --bg-section: #F5F2EE;
  --border-light: rgba(27, 45, 79, 0.08);
  --shadow-sm: 0 2px 8px rgba(10, 22, 40, 0.06);
  --shadow-md: 0 8px 30px rgba(10, 22, 40, 0.1);
  --shadow-lg: 0 20px 60px rgba(10, 22, 40, 0.12);
  --shadow-glow: 0 0 40px rgba(30, 86, 160, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Noto Serif SC', Georgia, serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.22, 1.2, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--warm-white);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--brand-blue-light); color: var(--pure-white); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
}

#cursor-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.5s var(--ease-out-expo);
}
.navbar.scrolled {
  padding: 10px 0;
  background: rgba(247, 244, 240, 0.88);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; }
.logo-img {
  height: 40px;
  width: auto;
  transition: transform 0.3s var(--ease-out-back);
}
.logo-img:hover { transform: scale(1.05); }
.navbar:not(.scrolled) .logo-img { filter: brightness(0) invert(1); }

.nav-links { display: flex; align-items: center; gap: 36px; }

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
  transition: color 0.3s;
}
.navbar:not(.scrolled) .nav-link { color: rgba(255,255,255,0.85); }
.navbar:not(.scrolled) .nav-link:hover { color: #fff; }
.navbar.scrolled .nav-link { color: var(--text-secondary); }
.navbar.scrolled .nav-link:hover { color: var(--brand-blue); }

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--brand-blue-light);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out-expo);
}
.nav-link:hover::after { width: 100%; }

.nav-link-cta {
  padding: 8px 24px;
  border-radius: 100px;
  background: var(--brand-blue);
  color: #fff !important;
  font-weight: 600;
  transition: all 0.3s var(--ease-out-back);
}
.nav-link-cta::after { display: none; }
.nav-link-cta:hover {
  background: var(--brand-blue-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}
.navbar:not(.scrolled) .nav-toggle span { background: #fff; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep-space);
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 20px 80px;
  max-width: 800px;
}
.hero-tagline {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-blue-light);
  margin-bottom: 24px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 0.3s var(--ease-out-expo) forwards;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 28px;
}
.title-line {
  display: block;
  opacity: 0; transform: translateY(40px);
  animation: fadeUp 0.8s 0.5s var(--ease-out-expo) forwards;
}
.title-line:nth-child(2) { animation-delay: 0.7s; }
.title-accent {
  background: linear-gradient(135deg, var(--brand-blue-light), var(--copper-green), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
}
.hero-desc {
  font-size: clamp(1rem, 1.8vw, 1.1rem);
  color: rgba(255,255,255,0.55);
  line-height: 1.9;
  max-width: 600px;
  margin: 0 auto 36px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 0.9s var(--ease-out-expo) forwards;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 48px;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 1.1s var(--ease-out-expo) forwards;
}
.hero-products-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 1.3s var(--ease-out-expo) forwards;
}
.hero-product-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.7);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.4s var(--ease-out-back);
}
.hero-product-chip:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  transform: translateY(-2px);
}
.chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dot-color);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 1.6s var(--ease-out-expo) forwards;
}
.scroll-text {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
}
.scroll-arrow {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.4s var(--ease-out-back);
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 4px 20px rgba(30, 86, 160, 0.3);
}
.btn-primary:hover {
  background: var(--brand-blue-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(30, 86, 160, 0.4);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.85);
}
.btn-ghost:hover {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}
.btn-sm { padding: 10px 24px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* ---- Section Commons ---- */
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 60px;
}

/* ============================================
   Metrics Strip
   ============================================ */
.metrics {
  padding: 60px 0;
  background: var(--pure-white);
  border-bottom: 1px solid var(--border-light);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.metric-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--brand-blue);
  line-height: 1;
}
.metric-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  letter-spacing: 0.05em;
}

/* ============================================
   Products Section
   ============================================ */
.products {
  padding: 120px 0 80px;
  background: var(--warm-white);
  text-align: center;
}

.product-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  text-align: left;
  padding: 80px 0;
  border-bottom: 1px solid var(--border-light);
}
.product-showcase:last-child { border-bottom: none; }
.product-showcase.reverse { direction: rtl; }
.product-showcase.reverse > * { direction: ltr; }

.product-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: var(--brand-blue-glow);
  color: var(--brand-blue);
  margin-bottom: 16px;
}
.product-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 4px;
}
.product-tagline {
  font-size: 0.88rem;
  color: var(--brand-blue-light);
  font-weight: 500;
  margin-bottom: 16px;
  font-family: 'Inter', monospace;
}
.product-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}
.product-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--pure-white);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all 0.3s;
}
.feature-chip:hover {
  border-color: var(--brand-blue-light);
  color: var(--brand-blue);
  background: var(--brand-blue-glow);
}
.feature-icon {
  color: var(--brand-blue-light);
  font-size: 0.7rem;
}

/* ---- Device Mockup ---- */
.product-preview {
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-device {
  perspective: 1000px;
  transition: transform 0.6s var(--ease-out-expo);
}
.preview-device:hover { transform: translateY(-8px); }

.device-frame {
  border-radius: 28px;
  background: #1A1A2E;
  padding: 12px;
  box-shadow:
    0 20px 60px rgba(10, 22, 40, 0.25),
    0 0 0 1px rgba(255,255,255,0.08) inset;
  transition: box-shadow 0.4s;
}
.preview-device:hover .device-frame {
  box-shadow:
    0 30px 80px rgba(10, 22, 40, 0.3),
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 0 60px rgba(30, 86, 160, 0.1);
}

.preview-phone .device-frame { width: 280px; }

.device-screen {
  border-radius: 18px;
  overflow: hidden;
  background: #f8f8fa;
}

.screen-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Desktop device frame */
.device-frame-desktop {
  border-radius: 12px;
  padding: 0;
  width: 520px;
  max-width: 90vw;
  overflow: hidden;
}
.device-frame-desktop .device-screen {
  border-radius: 0;
}
.device-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #2A2A3E;
}
.topbar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}
.topbar-dot:first-child { background: #ff5f57; }
.topbar-dot:nth-child(2) { background: #febc2e; }
.topbar-dot:nth-child(3) { background: #28c840; }

/* ============================================
   Tech Section
   ============================================ */
.tech {
  padding: 120px 0;
  background: var(--deep-space);
  text-align: center;
}
.tech .section-label { color: var(--brand-blue-light); }
.tech .section-title { color: #fff; }
.tech-sub { color: rgba(255,255,255,0.45); }

.tech-arch {
  margin: 0 auto 20px;
  max-width: 900px;
}
.arch-lines { width: 100%; height: 80px; }

.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.tech-item {
  padding: 36px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  text-align: center;
  transition: all 0.4s var(--ease-out-expo);
}
.tech-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(59, 125, 216, 0.2);
  transform: translateY(-4px);
}
.tech-icon-wrap {
  width: 56px; height: 56px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(59, 125, 216, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue-light);
  transition: transform 0.4s var(--ease-out-back);
}
.tech-icon-wrap svg { width: 28px; height: 28px; }
.tech-item:hover .tech-icon-wrap { transform: scale(1.1); }
.tech-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}
.tech-item p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
}

/* ============================================
   Cases Section
   ============================================ */
.cases {
  padding: 120px 0;
  background: var(--bg-section);
  text-align: center;
}
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case-card {
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  background: var(--pure-white);
  border: 1.5px solid var(--border-light);
  text-align: left;
  transition: all 0.4s var(--ease-out-expo);
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.case-icon { font-size: 1.8rem; margin-bottom: 16px; }
.case-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.case-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.case-product {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--brand-blue-glow);
  color: var(--brand-blue);
}

/* ============================================
   About Section
   ============================================ */
.about {
  padding: 120px 0;
  background: var(--warm-white);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 20px;
}
.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.highlight {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--pure-white);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.3s;
}
.highlight:hover {
  border-color: var(--brand-blue-light);
  box-shadow: var(--shadow-sm);
}
.highlight svg { color: var(--brand-blue); flex-shrink: 0; }

.about-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-visual-inner {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
}
.neural-svg { width: 100%; height: 100%; }
.neural-path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  transition: stroke-dashoffset 2s var(--ease-out-expo);
}
.neural-path.drawn { stroke-dashoffset: 0; }
.neural-dot {
  opacity: 0;
  transition: opacity 0.6s 0.5s;
}
.neural-dot.visible { opacity: 1; }

/* ============================================
   Contact Section
   ============================================ */
.contact {
  padding: 120px 0;
  background: var(--bg-section);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}
.contact-entries { display: flex; flex-direction: column; gap: 16px; }
.contact-entry {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--pure-white);
  border: 1px solid var(--border-light);
}
.contact-entry strong {
  font-size: 0.95rem;
  display: block;
  margin-bottom: 4px;
}
.contact-entry p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.contact-form-wrap {
  padding: 40px;
  border-radius: var(--radius-xl);
  background: var(--pure-white);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--warm-white);
  transition: all 0.3s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand-blue-light);
  box-shadow: 0 0 0 4px var(--brand-blue-glow);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238B9DAF' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 80px 0 40px;
  background: var(--deep-space);
  color: rgba(255,255,255,0.5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-logo {
  height: 36px;
  filter: brightness(0) invert(1);
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.9rem; color: rgba(255,255,255,0.4); }
.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.footer-links a {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  padding: 4px 0;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--brand-blue-light); }
.footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
}

/* ============================================
   AI Chat Widget
   ============================================ */
.ai-chat-trigger {
  position: fixed;
  bottom: 32px; right: 32px;
  z-index: 900;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(30, 86, 160, 0.4);
  transition: all 0.4s var(--ease-out-back);
}
.ai-chat-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(30, 86, 160, 0.5);
}
.chat-pulse {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--brand-blue-light);
  animation: chatPulse 2s infinite;
}
@keyframes chatPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.4); opacity: 0; }
}
.ai-chat-panel {
  position: fixed;
  bottom: 100px; right: 32px;
  z-index: 901;
  width: 380px;
  max-height: 520px;
  border-radius: var(--radius-xl);
  background: var(--pure-white);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s var(--ease-out-expo);
}
.ai-chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}
.chat-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: var(--warm-white);
}
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-header-info strong { font-size: 0.9rem; display: block; }
.chat-status { font-size: 0.7rem; color: var(--copper-green); }
.chat-close {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.chat-close:hover { color: var(--text-primary); }
.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 280px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg p {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.6;
  max-width: 85%;
}
.chat-msg-bot p {
  background: var(--bg-section);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}
.chat-msg-user { align-self: flex-end; }
.chat-msg-user p {
  background: var(--brand-blue);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.chat-input-wrap {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  background: var(--pure-white);
}
.chat-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.3s;
}
.chat-input:focus { border-color: var(--brand-blue-light); }
.chat-send {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out-back);
}
.chat-send:hover { background: var(--brand-blue-light); transform: scale(1.05); }

/* ============================================
   Premium Effects Layer
   ============================================ */

/* Noise grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-blue-light), var(--copper-green));
  z-index: 1001;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--brand-blue-light), 0 0 30px rgba(59, 125, 216, 0.3);
}

/* Hero floating geometry */
.hero-geo {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(59, 125, 216, 0.12);
  pointer-events: none;
  z-index: 1;
}
.hero-geo-1 {
  width: 300px; height: 300px;
  top: 15%; left: -5%;
  animation: geoFloat1 20s ease-in-out infinite;
}
.hero-geo-2 {
  width: 200px; height: 200px;
  bottom: 20%; right: -3%;
  border-color: rgba(92, 138, 111, 0.1);
  animation: geoFloat2 16s ease-in-out infinite;
}
.hero-geo-3 {
  width: 120px; height: 120px;
  top: 30%; right: 15%;
  border-color: rgba(196, 163, 90, 0.08);
  border-radius: 30%;
  animation: geoFloat3 12s ease-in-out infinite;
}
@keyframes geoFloat1 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -20px) rotate(60deg); }
  66% { transform: translate(-15px, 25px) rotate(120deg); }
}
@keyframes geoFloat2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-25px, -30px) rotate(-90deg); }
}
@keyframes geoFloat3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(20px, 15px) rotate(45deg); }
}

/* Hero title shimmer */
.title-line:first-child {
  background: linear-gradient(
    90deg,
    #fff 0%, #fff 40%,
    var(--brand-blue-light) 50%,
    #fff 60%, #fff 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s 0.5s var(--ease-out-expo) forwards, shimmer 4s 2s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: -100% 0; }
}

/* Ambient glow orbs */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
.products { position: relative; overflow: hidden; }
.products .ambient-orb-1 {
  width: 500px; height: 500px;
  top: 10%; left: -10%;
  background: radial-gradient(circle, rgba(30, 86, 160, 0.08), transparent 70%);
  animation: orbDrift1 25s ease-in-out infinite;
}
.products .ambient-orb-2 {
  width: 400px; height: 400px;
  bottom: 15%; right: -8%;
  background: radial-gradient(circle, rgba(92, 138, 111, 0.06), transparent 70%);
  animation: orbDrift2 20s ease-in-out infinite;
}
@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(60px, 40px); }
}
@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, -30px); }
}

/* Card light sweep effect */
.service-card-glow,
.case-card,
.tech-item,
.contact-form-wrap,
.highlight {
  position: relative;
  overflow: hidden;
}
.case-card::before,
.tech-item::before,
.highlight::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.6s var(--ease-out-expo);
  pointer-events: none;
  z-index: 1;
}
.case-card:hover::before,
.tech-item:hover::before,
.highlight:hover::before {
  left: 120%;
}

/* Device screen glow halo */
.preview-device {
  position: relative;
}
.preview-device::before {
  content: '';
  position: absolute;
  inset: -30px;
  border-radius: 40px;
  background: radial-gradient(circle, rgba(59, 125, 216, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
  z-index: -1;
}
.preview-device:hover::before { opacity: 1; }

/* Device reflection sweep */
.device-frame {
  position: relative;
  overflow: hidden;
}
.device-frame::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 30%; height: 200%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 55%,
    transparent 60%
  );
  transform: translateX(-100%) rotate(25deg);
  transition: transform 0.8s var(--ease-out-expo);
  pointer-events: none;
  z-index: 10;
}
.preview-device:hover .device-frame::after {
  transform: translateX(350%) rotate(25deg);
}

/* Enhanced button glow */
.btn-primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light), var(--copper-green));
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 0.4s;
}
.btn-primary:hover::before { opacity: 0.5; }

/* Magnetic button visual state */
.btn.magnetic-active {
  transition: none;
}

/* Tech section ambient */
.tech {
  position: relative;
  overflow: hidden;
}
.tech::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 125, 216, 0.06), transparent 70%);
  pointer-events: none;
}

/* Section divider beams */
.section-beam {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(30, 86, 160, 0.15) 20%,
    rgba(59, 125, 216, 0.3) 50%,
    rgba(30, 86, 160, 0.15) 80%,
    transparent 100%
  );
  position: relative;
}
.section-beam::after {
  content: '';
  position: absolute;
  top: -3px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-blue-light);
  box-shadow: 0 0 12px var(--brand-blue-light);
  animation: beamDot 3s ease-in-out infinite;
}
@keyframes beamDot {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
}

/* Metric number glow */
.metric-number {
  text-shadow: 0 0 40px rgba(30, 86, 160, 0.15);
}

/* Product badge pulse */
.product-badge {
  position: relative;
}
.product-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 var(--brand-blue-glow);
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 125, 216, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(59, 125, 216, 0); }
}

/* Floating particles for tech section (CSS only) */
.tech-particle {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--brand-blue-light);
  pointer-events: none;
  opacity: 0.3;
}
.tech-particle:nth-child(1) { top: 20%; left: 10%; animation: techFloat 8s ease-in-out infinite; }
.tech-particle:nth-child(2) { top: 60%; left: 85%; animation: techFloat 10s 2s ease-in-out infinite; }
.tech-particle:nth-child(3) { top: 40%; left: 30%; animation: techFloat 12s 4s ease-in-out infinite; }
.tech-particle:nth-child(4) { top: 75%; left: 60%; animation: techFloat 9s 1s ease-in-out infinite; }
.tech-particle:nth-child(5) { top: 15%; left: 70%; animation: techFloat 11s 3s ease-in-out infinite; }
.tech-particle:nth-child(6) { top: 85%; left: 20%; animation: techFloat 7s 5s ease-in-out infinite; }
@keyframes techFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.15; }
  25% { transform: translate(15px, -20px); opacity: 0.4; }
  50% { transform: translate(-10px, -35px); opacity: 0.2; }
  75% { transform: translate(20px, -10px); opacity: 0.35; }
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .product-showcase { grid-template-columns: 1fr; gap: 40px; }
  .product-showcase.reverse { direction: ltr; }
  .preview-device { order: -1; }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(247, 244, 240, 0.98);
    backdrop-filter: blur(20px);
    padding: 20px;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
  }
  .navbar:not(.scrolled) .nav-links.open .nav-link { color: var(--text-primary); }
  .nav-toggle { display: flex; }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .about-highlights { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .tech-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }

  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .title-accent { font-size: clamp(1.2rem, 5vw, 1.8rem); }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-products-bar { flex-direction: column; align-items: center; }

  .ai-chat-panel { width: calc(100vw - 32px); right: 16px; bottom: 90px; }
  .ai-chat-trigger { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 24px; }
  .preview-phone .device-frame { width: 240px; }
  .device-frame-desktop { width: 100%; }
}
