/* ============================================
   QUANTUM LEAF SOFTWARE — HOME PAGE STYLES
   Hero, marquee, stats, services overview,
   chatbot demo, testimonials, CTA banner
   ============================================ */

/* --- Hero Section --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-base);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,21,32,0.3) 0%, rgba(13,21,32,0.85) 100%);
  z-index: 1;
}
.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 2;
  animation: morphGradient 12s ease-in-out infinite;
}
@keyframes morphGradient {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.05); }
}
.hero-shapes { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.shape {
  position: absolute;
  border: 1px solid rgba(232,234,240,0.04);
  border-radius: var(--r-xl);
}
.shape-1 {
  width: 400px;
  height: 400px;
  top: 10%;
  right: 5%;
  transform: rotate(15deg);
  animation: rotateShape 30s linear infinite;
}
.shape-2 {
  width: 200px;
  height: 200px;
  bottom: 20%;
  left: 8%;
  transform: rotate(-10deg);
  animation: rotateShape 25s linear infinite reverse;
}
.shape-3 {
  width: 120px;
  height: 120px;
  top: 30%;
  left: 15%;
  animation: rotateShape 20s linear infinite;
}
@keyframes rotateShape { to { transform: rotate(360deg); } }

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-top: 68px;
}
.hero-headline {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.08;
  color: var(--text-primary);
  margin: var(--sp-4) 0;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  margin-bottom: var(--sp-10);
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}
.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
  0%,100% { transform: rotate(45deg) translateY(0); }
  50%      { transform: rotate(45deg) translateY(6px); }
}

@media (max-width: 768px) {
  .hero { min-height: 600px; }
  .hero-headline { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-sub br { display: none; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn-lg { width: 100%; max-width: 300px; justify-content: center; }
  .shape-1 { width: 200px; height: 200px; }
  .shape-2 { width: 120px; height: 120px; }
  .shape-3 { width: 80px; height: 80px; }
  .hero-scroll-indicator { display: none; }
}

/* --- Client Marquee Strip --- */
.marquee-strip {
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  overflow: hidden;
}
.marquee-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  letter-spacing: 0.15em;
  white-space: nowrap;
  padding-left: var(--sp-6);
  flex-shrink: 0;
}
.marquee-track { flex: 1; overflow: hidden; }
.marquee-content {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  animation: marqueeScroll 20s linear infinite;
  width: max-content;
}
.marquee-content span {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-content .dot { color: var(--text-faint); }
.marquee-track:hover .marquee-content { animation-play-state: paused; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .marquee-label { display: none; }
}

/* --- Stats Section --- */
.stats-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-12);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-number {
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border-accent);
}
@media (max-width: 768px) {
  .stats-grid { flex-direction: column; gap: var(--sp-8); }
  .stat-divider { width: 48px; height: 1px; }
  .stat-number { font-size: var(--text-4xl); }
}

/* --- Services Overview Grid --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.service-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.service-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}
.service-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  opacity: 0.7;
  transition: opacity 0.2s;
}
.service-link:hover { opacity: 1; }
@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* --- Chatbot Demo Section --- */
.chatbot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}
.chatbot-text { max-width: 440px; }
.chatbot-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-6);
  letter-spacing: 0.05em;
}
.chat-window {
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}
.chat-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--bg-border);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-online);
  opacity: 0.6;
  animation: statusPulse 2s ease-in-out infinite;
}
@keyframes statusPulse {
  0%,100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.chat-online {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}
.chat-messages {
  padding: var(--sp-4) var(--sp-6);
  height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.message { display: flex; flex-direction: column; }
.message.user { justify-content: flex-end; }
.message.user .message-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border-bright);
  color: var(--text-primary);
}
.message.bot .message-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  color: var(--text-secondary);
}
.message-bubble {
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  line-height: 1.5;
  max-width: 85%;
}
.message.bot .message-bubble .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 4px;
  animation: typingDot 1.4s ease-in-out infinite;
}
.message.bot .message-bubble .dot:nth-child(2) { animation-delay: 0.2s; }
.message.bot .message-bubble .dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%,60%,100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.chat-input-bar {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--bg-border);
}
.chat-input-bar input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  border-radius: var(--r-md);
  padding: 8px 14px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: var(--text-sm);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-bar input:focus { border-color: var(--border-accent); }
.chat-input-bar input::placeholder { color: var(--text-muted); }

@media (max-width: 768px) {
  .chatbot-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .chat-window { max-width: 100%; }
  .chatbot-text { max-width: 100%; }
}

/* --- Testimonials --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
}
.testimonial-card { padding: var(--sp-8); }
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}
.testimonial-quote {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
  font-style: italic;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
}
.testimonial-author strong {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.testimonial-author span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* --- How It Works / Process Strip --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}
.process-step { text-align: center; }
.process-step:nth-child(1) { transition-delay: 0s; }
.process-step:nth-child(2) { transition-delay: 0.12s; }
.process-step:nth-child(3) { transition-delay: 0.24s; }
.process-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-weight: 800;
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
}
.process-step h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.process-step p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}
@media (max-width: 768px) {
  .process-grid { grid-template-columns: 1fr; gap: var(--sp-8); }
}

/* --- CTA Banner --- */
.cta-banner {
  background: var(--bg-surface);
  border-top: 1px solid var(--bg-border);
  border-bottom: 1px solid var(--bg-border);
}
.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.cta-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.cta-content p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
}
.cta-buttons {
  display: flex;
  gap: var(--sp-4);
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-buttons .btn-lg { width: 100%; max-width: 300px; justify-content: center; }
}

/* --- Reduced motion — home page --- */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-gradient { animation: none; }
  .shape { animation: none; }
  .scroll-arrow { animation: none; }
  .marquee-content { animation: none; }
  .chat-status-dot { animation: none; opacity: 1; }
  .message.bot .message-bubble .dot { animation: none; opacity: 1; }
}
