/* ========================================
   SOFEI AI Technology Page — Redesigned
   Anti-slop, editorial, confident
   ======================================== */

/* --- Noise overlay for dark sections --- */
.ai-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  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-size: 200px 200px;
}

/* --- AI Hero --- */
.ai-hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 140px 0 100px;
  background: #080e1a;
}

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

#aiNeuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.ai-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(15, 102, 232, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.3) 0%, rgba(8, 14, 26, 0.85) 100%);
  z-index: 1;
}

/* --- Audio Waveform Canvas --- */
#aiWaveCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- AI Spectrum Bars --- */
.ai-spectrum-bars {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 80px;
  z-index: 2;
  opacity: 0.4;
  pointer-events: none;
}

.ai-spectrum-bar {
  width: 3px;
  min-height: 4px;
  background: linear-gradient(to top, rgba(15, 102, 232, 0.7), rgba(117, 182, 255, 0.9));
  border-radius: 2px 2px 0 0;
  transition: height 120ms ease-out;
}

/* --- Music Particles Canvas --- */
#aiMusicParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.ai-hero-content {
  position: relative;
  z-index: 2;
  width: var(--page-width);
  max-width: 860px;
  margin: 0 auto;
  text-align: left;
  color: #fff;
}

.ai-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 28px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: fadeInUp 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-hero-badge svg {
  display: none;
}

.ai-hero-title {
  font-family: "Sora", sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin: 0 0 28px;
  letter-spacing: -0.035em;
  max-width: 700px;
}

.ai-title-line {
  display: block;
  animation: fadeInUp 500ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ai-title-line:nth-child(1) { animation-delay: 100ms; }
.ai-title-line:nth-child(2) { animation-delay: 200ms; }

.ai-title-accent {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  color: var(--accent, #75b6ff);
}

.ai-hero-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.55);
  max-width: 560px;
  margin: 0 0 48px;
  animation: fadeInUp 500ms cubic-bezier(0.22, 1, 0.36, 1) 300ms both;
}

.ai-hero-stats {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  animation: fadeInUp 500ms cubic-bezier(0.22, 1, 0.36, 1) 450ms both;
}

.ai-hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-hero-stat:first-child {
  padding-left: 0;
}

.ai-hero-stat:last-child {
  border-right: none;
}

.ai-hero-stat strong {
  font-family: "Sora", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: unset;
  color: #fff;
  letter-spacing: -0.02em;
}

.ai-hero-stat span {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-hero-stat-divider {
  display: none;
}

/* --- AI Pillar Cards (Bento Grid) --- */
.ai-capabilities-section {
  padding-top: 100px;
  padding-bottom: 100px;
}

.ai-pillar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 48px;
}

.ai-pillar-card {
  position: relative;
  background: var(--surface, #fff);
  border-radius: 24px;
  padding: 44px 36px 36px;
  border: 1px solid rgba(15, 37, 87, 0.06);
  box-shadow: var(--shadow-soft, 0 14px 40px rgba(15, 45, 99, 0.06));
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms ease, background 400ms ease;
  overflow: hidden;
}

.ai-pillar-card::before {
  display: none;
}

.ai-pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(15, 45, 99, 0.12);
  background: var(--surface, #fff);
}

.ai-pillar-card:hover::before {
  opacity: 0;
}

/* 3rd card (QC) spans full width */
.ai-pillar-card:nth-child(3) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  border-radius: 24px;
}

.ai-pillar-icon-wrap {
  position: relative;
  width: auto;
  height: auto;
  margin-bottom: 20px;
}

.ai-pillar-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #102550);
  position: relative;
  z-index: 1;
}

.ai-pillar-icon svg {
  width: 28px;
  height: 28px;
}

.ai-pillar-glow {
  display: none;
}

.ai-pillar-card h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text, #102550);
  letter-spacing: -0.01em;
}

.ai-pillar-card > p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-soft, #5f6d89);
  margin: 0 0 24px;
  max-width: 52ch;
}

.ai-pillar-metrics {
  display: flex;
  gap: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line, rgba(15, 37, 87, 0.1));
  margin-bottom: 0;
}

.ai-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-metric strong {
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text, #102550);
  letter-spacing: -0.02em;
}

.ai-metric span {
  font-size: 0.68rem;
  color: var(--text-soft, #5f6d89);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-pillar-tag {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text-soft, #5f6d89);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 16px;
}

/* --- AI Workflow Timeline --- */
.ai-workflow-section {
  padding-top: 100px;
  padding-bottom: 100px;
  background: var(--bg, #f6f7fb);
}

.ai-workflow-timeline {
  position: relative;
  max-width: 760px;
  margin: 48px auto 0;
  padding-left: 56px;
}

.ai-workflow-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 19px;
  width: 1px;
  background: var(--line, rgba(15, 37, 87, 0.1));
}

.ai-workflow-step {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1), transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-workflow-step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ai-workflow-node {
  position: absolute;
  left: -44px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text, #102550);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  z-index: 2;
}

.ai-workflow-num {
  display: none;
}

.ai-workflow-pulse {
  display: none;
}

.ai-workflow-card {
  background: var(--surface, #fff);
  border-radius: 20px;
  padding: 28px 28px;
  border: 1px solid rgba(15, 37, 87, 0.06);
  box-shadow: var(--shadow-soft, 0 14px 40px rgba(15, 45, 99, 0.06));
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms ease;
}

.ai-workflow-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(15, 45, 99, 0.1);
}

.ai-workflow-label {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text-soft, #5f6d89);
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-workflow-card h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text, #102550);
  letter-spacing: -0.01em;
}

.ai-workflow-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-soft, #5f6d89);
  margin: 0;
  max-width: 56ch;
}

/* --- AI Tech Stack (Inline Layout) --- */
.ai-tech-section {
  padding-top: 100px;
  padding-bottom: 100px;
}

.ai-tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.ai-tech-card {
  text-align: left;
  padding: 28px 24px;
  border-radius: 24px;
  background: var(--surface, #fff);
  border: 1px solid rgba(15, 37, 87, 0.06);
  box-shadow: var(--shadow-soft, 0 14px 40px rgba(15, 45, 99, 0.06));
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms ease;
}

.ai-tech-card:last-child {
  border-right: none;
}

.ai-tech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(15, 45, 99, 0.12);
}

.ai-tech-icon {
  width: auto;
  height: auto;
  margin: 0 0 14px 0;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #102550);
}

.ai-tech-icon svg {
  width: 24px;
  height: 24px;
}

.ai-tech-card h4 {
  font-family: "Sora", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text, #102550);
  letter-spacing: -0.01em;
}

.ai-tech-card p {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-soft, #5f6d89);
  margin: 0;
}

/* --- AI Value Section --- */
.ai-value-section {
  padding-top: 100px;
  padding-bottom: 100px;
  background: var(--bg, #f6f7fb);
}

.ai-value-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 80px;
  align-items: start;
}

.ai-value-content h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin: 8px 0 40px;
  color: var(--text, #102550);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.ai-value-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}

.ai-value-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  padding: 28px 24px;
  border-radius: 20px;
  background: var(--surface, #fff);
  border: 1px solid rgba(15, 37, 87, 0.06);
  box-shadow: var(--shadow-soft, 0 14px 40px rgba(15, 45, 99, 0.06));
  transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 400ms ease;
}

.ai-value-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(15, 45, 99, 0.1);
}

.ai-value-check {
  display: none;
}

.ai-value-item h4 {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text, #102550);
  letter-spacing: -0.01em;
}

.ai-value-item p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-soft, #5f6d89);
  margin: 0;
}

/* Value visual: editorial pull-quote replacing orbit canvas */
.ai-value-visual {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 20px;
}

.ai-value-graphic {
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: auto;
}

#aiOrbitCanvas {
  display: none;
}

.ai-value-center-badge {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--text, #102550);
  box-shadow: none;
}

.ai-value-center-badge svg {
  display: none;
}

.ai-value-center-badge span {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text, #102550);
}

.ai-value-center-badge::after {
  content: "of our production line is automated by machine learning models — from acoustic simulation to defect detection.";
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-soft, #5f6d89);
  letter-spacing: 0;
  max-width: 36ch;
  margin-top: 8px;
}

.ai-value-center-badge::after {
  content: "of our production line is automated by machine learning models — from acoustic simulation to defect detection.";
  display: block;
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-soft, #5f6d89);
  letter-spacing: 0;
  max-width: 36ch;
  margin-top: 8px;
}

/* --- AI CTA Section --- */
.ai-cta-section {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 100px 0;
  background: #080e1a;
  overflow: hidden;
}

#aiCtaParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.25;
}

.ai-cta-content {
  position: relative;
  z-index: 2;
  width: var(--page-width);
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
  color: #fff;
}

.ai-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ai-cta-badge svg {
  display: none;
}

.ai-cta-content h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ai-cta-content > p {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 40px;
  max-width: 50ch;
}

.ai-cta-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.ai-btn-glow {
  box-shadow: 0 8px 24px rgba(15, 102, 232, 0.2);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-btn-glow:hover {
  box-shadow: 0 12px 32px rgba(15, 102, 232, 0.3);
}

.ai-btn-glow:active {
  transform: scale(0.98) translateY(1px);
}

.ai-cta-content .button-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), background 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-cta-content .button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ai-cta-content .button-secondary:active {
  transform: scale(0.98) translateY(1px);
}

/* --- Global interaction polish --- */
.ai-pillar-card:active {
  background: #f0f4ff;
}

.ai-workflow-card:active {
  opacity: 0.8;
}

/* Focus-visible ring for all interactive/focusable elements */
.ai-hero a:focus-visible,
.ai-pillar-card:focus-visible,
.ai-workflow-card:focus-visible,
.ai-tech-card:focus-visible,
.ai-value-item:focus-visible,
.ai-cta-section a:focus-visible,
.ai-cta-section button:focus-visible,
.ai-chat-btn:focus-visible,
.ai-chat-send:focus-visible,
.ai-chat-input:focus-visible,
.ai-chat-suggestion:focus-visible {
  outline: 2px solid var(--primary, #0f66e8);
  outline-offset: 3px;
}

/* --- AI Nav Link --- */
.ai-nav-link {
  position: relative;
}

.ai-nav-link::before {
  content: "";
  position: absolute;
  top: -2px;
  right: -6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary, #0f66e8);
  animation: aiDotPulse 2.5s ease-in-out infinite;
}

/* --- AI Chatbot Widget --- */
.ai-chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.ai-chat-bubble {
  max-width: 280px;
  padding: 14px 18px;
  border-radius: 18px 18px 4px 18px;
  background: var(--surface, #fff);
  box-shadow: 0 8px 32px rgba(15, 45, 99, 0.1);
  border: 1px solid var(--line, rgba(15, 37, 87, 0.08));
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text, #102550);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  animation: chatBubbleIn 500ms cubic-bezier(0.22, 1, 0.36, 1) 2s forwards;
  cursor: pointer;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-bubble:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 12px 40px rgba(15, 45, 99, 0.14);
}

.ai-chat-bubble strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary, #0f66e8);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.ai-chat-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0f66e8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(15, 102, 232, 0.25);
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 28px rgba(15, 102, 232, 0.3);
}

.ai-chat-btn:active {
  transform: scale(0.96);
}

.ai-chat-btn svg {
  width: 24px;
  height: 24px;
}

.ai-chat-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(15, 102, 232, 0.25);
  animation: pulse 2.5s ease-in-out infinite;
}

/* --- Homepage AI Section --- */
.ai-home-section {
  padding-top: 100px;
  padding-bottom: 100px;
}

.ai-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 48px;
  background: var(--line, rgba(15, 37, 87, 0.1));
  border-radius: var(--radius-lg, 24px);
  overflow: hidden;
}

.ai-home-card {
  position: relative;
  padding: 36px 28px;
  border-radius: 0;
  background: var(--surface, #fff);
  border: none;
  box-shadow: none;
  transition: background 400ms cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.ai-home-card:hover {
  transform: none;
  box-shadow: none;
  background: #f8faff;
}

.ai-home-card-icon {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #102550);
  margin-bottom: 16px;
}

.ai-home-card-icon svg {
  width: 24px;
  height: 24px;
}

.ai-home-card h3 {
  font-family: "Sora", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text, #102550);
  letter-spacing: -0.01em;
}

.ai-home-card p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-soft, #5f6d89);
  margin: 0 0 16px;
  max-width: 48ch;
}

.ai-home-card .text-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary, #0f66e8);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-home-card .text-link:hover {
  gap: 12px;
}

.ai-home-cta {
  text-align: center;
  margin-top: 40px;
}

/* --- AI Chat Panel --- */
.ai-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  z-index: 101;
  width: 360px;
  max-height: 500px;
  border-radius: 20px;
  background: var(--surface, #fff);
  box-shadow: 0 16px 48px rgba(15, 45, 99, 0.14);
  border: 1px solid var(--line, rgba(15, 37, 87, 0.08));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 300ms cubic-bezier(0.22, 1, 0.36, 1), transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.ai-chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--primary, #0f66e8);
  color: #fff;
}

.ai-chat-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
}

.ai-chat-panel-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  transition: background 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-panel-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.ai-chat-panel-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: 300px;
}

.ai-chat-msg {
  margin-bottom: 12px;
}

.ai-chat-msg-bot p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text, #102550);
  margin: 0 0 8px;
}

.ai-chat-msg-bot ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-soft, #5f6d89);
}

.ai-chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ai-chat-suggestion {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--surface-muted, #eef4ff);
  border: 1px solid var(--line, rgba(15, 37, 87, 0.08));
  color: var(--primary, #0f66e8);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 300ms cubic-bezier(0.22, 1, 0.36, 1), transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-suggestion:hover {
  background: rgba(15, 102, 232, 0.06);
  transform: translateX(3px);
}

.ai-chat-suggestion:active {
  transform: scale(0.98);
}

.ai-chat-panel-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line, rgba(15, 37, 87, 0.08));
  background: var(--bg, #f6f7fb);
}

.ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(15, 37, 87, 0.08));
  background: var(--surface, #fff);
  font-size: 0.88rem;
  color: var(--text, #102550);
  outline: none;
  transition: border-color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-input:focus {
  border-color: var(--primary, #0f66e8);
}

.ai-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary, #0f66e8);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-send:hover {
  transform: scale(1.06);
}

.ai-chat-send:active {
  transform: scale(0.94);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0; }
}

@keyframes aiDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

@keyframes chatBubbleIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Section heading typography --- */
.ai-capabilities-section .section-heading h2,
.ai-workflow-section .section-heading h2,
.ai-tech-section .section-heading h2 {
  letter-spacing: -0.025em;
}

.ai-capabilities-section .eyebrow,
.ai-workflow-section .eyebrow,
.ai-tech-section .eyebrow,
.ai-value-content .eyebrow {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .ai-value-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .ai-value-visual {
    order: -1;
  }
  .ai-value-list {
    grid-template-columns: 1fr 1fr;
  }
  .ai-home-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ai-home-card:last-child {
    grid-column: 1 / -1;
  }
  .ai-tech-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ai-tech-card:nth-child(2) {
    border-right: none;
  }
  .ai-tech-card:nth-child(-n+2) {
    border-bottom: 1px solid var(--line, rgba(15, 37, 87, 0.1));
    padding-bottom: 28px;
  }
  .ai-tech-card:nth-child(n+3) {
    padding-top: 28px;
  }
}

@media (max-width: 768px) {
  .ai-hero {
    min-height: auto;
    padding: 120px 0 72px;
  }
  .ai-hero-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }
  .ai-spectrum-bars {
    height: 50px;
    opacity: 0.3;
    bottom: 20px;
  }
  .ai-hero-stats {
    flex-direction: column;
    gap: 0;
  }
  .ai-hero-stat {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .ai-hero-stat:first-child {
    padding-left: 0;
  }
  .ai-hero-stat:last-child {
    border-bottom: none;
  }
  .ai-pillar-grid {
    grid-template-columns: 1fr;
  }
  .ai-pillar-card:nth-child(3) {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
  .ai-workflow-timeline {
    padding-left: 44px;
  }
  .ai-workflow-line {
    left: 15px;
  }
  .ai-workflow-node {
    left: -34px;
    width: 10px;
    height: 10px;
  }
  .ai-tech-grid {
    grid-template-columns: 1fr;
  }
  .ai-tech-card {
    border-right: none;
    border-bottom: 1px solid var(--line, rgba(15, 37, 87, 0.1));
    padding: 20px 0;
  }
  .ai-tech-card:last-child {
    border-bottom: none;
  }
  .ai-value-list {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ai-home-grid {
    grid-template-columns: 1fr;
  }
  .ai-home-card:last-child {
    grid-column: auto;
  }
  .ai-chat-bubble {
    max-width: 220px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .ai-cta-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .ai-hero {
    padding: 100px 0 60px;
  }
}
