/* =============================================
   NexCreo AI Mode — ai-mode.css
   Nav button styles + full overlay (scoped to #nexcreo-ai-overlay)
   ============================================= */

/* ── Nav AI Button (outside overlay scope, new class only) ── */
.nav-ai-btn {
  padding: 9px 20px;
  background: transparent;
  border: 1.5px solid #00C6FF;
  border-radius: 100px;
  color: #00C6FF;
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.nav-ai-btn:hover {
  background: #00C6FF;
  color: #03080F;
  box-shadow: 0 0 22px rgba(0, 198, 255, 0.4);
  transform: translateY(-1px);
}
@media (max-width: 380px) {
  .nav-ai-btn { padding: 8px 14px; font-size: 12px; }
}

/* Mobile menu AI link */
#mobileMenu .mobile-ai {
  background: rgba(0, 198, 255, 0.07) !important;
  border: 1px solid rgba(0, 198, 255, 0.2) !important;
  color: #00C6FF !important;
  font-weight: 600;
  margin-top: 4px;
}


/* =============================================
   AI OVERLAY — all rules scoped to #nexcreo-ai-overlay
   ============================================= */

#nexcreo-ai-overlay {
  /* Inherits site accent; falls back to site cyan */
  --ai-accent: var(--cyan, #00C6FF);
  --ai-bg:      #0b0f0b;
  --ai-card:    #151d15;
  --ai-text:    #f0f6ff;
  --ai-muted:   rgba(240, 246, 255, 0.42);
  --ai-border:  rgba(0, 198, 255, 0.18);
  --ai-user-bg: rgba(0, 198, 255, 0.13);
  --ai-ai-bg:   #151d15;
  --ai-err-bg:  rgba(255, 60, 60, 0.1);

  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: var(--ai-bg);
  background-image: radial-gradient(circle, rgba(0, 198, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  transform: translateY(22px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#nexcreo-ai-overlay.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* ── Light theme variant ── */
#nexcreo-ai-overlay.light {
  --ai-bg:      #f4f6fa;
  --ai-card:    #ffffff;
  --ai-text:    #0d1117;
  --ai-muted:   rgba(13, 17, 23, 0.48);
  --ai-border:  rgba(0, 100, 200, 0.2);
  --ai-user-bg: rgba(0, 198, 255, 0.1);
  --ai-ai-bg:   #ffffff;
  --ai-err-bg:  rgba(220, 50, 50, 0.07);
  background-color: var(--ai-bg);
  background-image: radial-gradient(circle, rgba(0, 100, 200, 0.055) 1px, transparent 1px);
}

/* ── Top Controls ── */
#nexcreo-ai-overlay .ai-top-controls {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 11;
}

#nexcreo-ai-overlay .ai-ctrl-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ai-border);
  background: var(--ai-card);
  color: var(--ai-muted);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  backdrop-filter: blur(8px);
  line-height: 1;
}
#nexcreo-ai-overlay .ai-ctrl-btn:hover {
  border-color: var(--ai-accent);
  color: var(--ai-accent);
}

/* ── Scrollable body ── */
#nexcreo-ai-overlay .ai-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 62px 20px 0;
}

#nexcreo-ai-overlay .ai-centered {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ── Brand ── */
#nexcreo-ai-overlay .ai-brand {
  display: flex;
  justify-content: center;
  margin: 18px 0 20px;
  flex-shrink: 0;
}

#nexcreo-ai-overlay .ai-logo-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid var(--ai-accent);
  background: rgba(0, 198, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 26px;
  font-weight: 700;
  color: var(--ai-accent);
  animation: ai-logo-pulse 3s ease-in-out infinite;
}

@keyframes ai-logo-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(0, 198, 255, 0.25), 0 0 0 0 rgba(0, 198, 255, 0.12); }
  50%       { box-shadow: 0 0 26px rgba(0, 198, 255, 0.55), 0 0 44px rgba(0, 198, 255, 0.09); }
}

/* ── Heading block ── */
#nexcreo-ai-overlay .ai-heading {
  text-align: center;
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: clamp(20px, 3.6vw, 32px);
  font-weight: 700;
  color: var(--ai-text);
  line-height: 1.2;
  margin-bottom: 10px;
  flex-shrink: 0;
}

#nexcreo-ai-overlay .ai-subheading {
  text-align: center;
  font-size: 14px;
  color: var(--ai-muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-shrink: 0;
}

/* ── Chat Log ── */
#nexcreo-ai-overlay .ai-chat-log {
  display: none; /* revealed by JS after first message */
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 16px;
  scroll-behavior: smooth;
}

/* Custom scrollbar */
#nexcreo-ai-overlay .ai-chat-log::-webkit-scrollbar       { width: 4px; }
#nexcreo-ai-overlay .ai-chat-log::-webkit-scrollbar-track { background: transparent; }
#nexcreo-ai-overlay .ai-chat-log::-webkit-scrollbar-thumb {
  background: var(--ai-accent);
  border-radius: 4px;
  opacity: 0.5;
}

/* ── Individual messages ── */
#nexcreo-ai-overlay .ai-msg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  animation: ai-msg-in 0.28s ease forwards;
  opacity: 0;
}

@keyframes ai-msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#nexcreo-ai-overlay .ai-msg--user  { align-items: flex-end; }
#nexcreo-ai-overlay .ai-msg--ai,
#nexcreo-ai-overlay .ai-msg--error { align-items: flex-start; }

#nexcreo-ai-overlay .ai-msg-label {
  font-size: 11px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  letter-spacing: 1px;
  color: var(--ai-muted);
  text-transform: uppercase;
}

#nexcreo-ai-overlay .ai-msg-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ai-text);
  max-width: 84%;
  word-break: break-word;
}

#nexcreo-ai-overlay .ai-msg--user .ai-msg-bubble {
  background: var(--ai-user-bg);
  border: 1px solid rgba(0, 198, 255, 0.22);
  border-bottom-right-radius: 4px;
}

#nexcreo-ai-overlay .ai-msg--ai .ai-msg-bubble {
  background: var(--ai-ai-bg);
  border: 1px solid var(--ai-border);
  border-bottom-left-radius: 4px;
}

#nexcreo-ai-overlay .ai-msg--error .ai-msg-bubble {
  background: var(--ai-err-bg);
  border: 1px solid rgba(255, 60, 60, 0.28);
  color: #ff7070;
  border-bottom-left-radius: 4px;
}

/* ── Typing indicator ── */
#nexcreo-ai-overlay .ai-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 13px 16px;
}

#nexcreo-ai-overlay .ai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ai-accent);
  animation: ai-dot-bounce 1.2s ease-in-out infinite;
}
#nexcreo-ai-overlay .ai-typing span:nth-child(2) { animation-delay: 0.18s; }
#nexcreo-ai-overlay .ai-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes ai-dot-bounce {
  0%, 80%, 100% { transform: translateY(0);   opacity: 0.35; }
  40%            { transform: translateY(-7px); opacity: 1; }
}

/* ── Popular Questions ── */
#nexcreo-ai-overlay .ai-popular {
  flex-shrink: 0;
  padding-bottom: 12px;
}

#nexcreo-ai-overlay .ai-popular-label {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--ai-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  text-align: center;
}

#nexcreo-ai-overlay .ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

#nexcreo-ai-overlay .ai-chip {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--ai-border);
  border-radius: 100px;
  color: var(--ai-muted);
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
  white-space: nowrap;
}
#nexcreo-ai-overlay .ai-chip:hover {
  border-color: var(--ai-accent);
  color: var(--ai-accent);
  background: rgba(0, 198, 255, 0.06);
  transform: translateY(-1px);
}

/* ── Input Section ── */
#nexcreo-ai-overlay .ai-input-section {
  flex-shrink: 0;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--ai-border);
  background: var(--ai-bg);
}

#nexcreo-ai-overlay .ai-input-centered {
  max-width: 720px;
  margin: 0 auto;
}

#nexcreo-ai-overlay .ai-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--ai-card);
  border: 1.5px solid var(--ai-border);
  border-radius: 100px;
  padding: 6px 6px 6px 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
#nexcreo-ai-overlay .ai-input-row:focus-within {
  border-color: var(--ai-accent);
  box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.1);
}

#nexcreo-ai-overlay .ai-text-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ai-text);
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-width: 0;
}
#nexcreo-ai-overlay .ai-text-input::placeholder { color: var(--ai-muted); }
#nexcreo-ai-overlay .ai-text-input:disabled      { opacity: 0.5; }

#nexcreo-ai-overlay .ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ai-accent), #0057FF);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.2s;
}
#nexcreo-ai-overlay .ai-send-btn:hover:not(:disabled) {
  opacity: 0.88;
  transform: scale(1.06);
}
#nexcreo-ai-overlay .ai-send-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
#nexcreo-ai-overlay .ai-send-btn svg {
  width: 18px;
  height: 18px;
}

/* ── Footer ── */
#nexcreo-ai-overlay .ai-powered {
  text-align: center;
  font-size: 11px;
  color: var(--ai-muted);
  margin-top: 9px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  letter-spacing: 0.5px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  #nexcreo-ai-overlay .ai-body          { padding: 54px 12px 0; }
  #nexcreo-ai-overlay .ai-brand         { margin: 14px 0 16px; }
  #nexcreo-ai-overlay .ai-logo-box      { width: 52px; height: 52px; font-size: 20px; border-radius: 12px; }
  #nexcreo-ai-overlay .ai-heading       { font-size: 18px; }
  #nexcreo-ai-overlay .ai-subheading    { font-size: 13px; margin-bottom: 18px; }
  #nexcreo-ai-overlay .ai-chip          { font-size: 12px; padding: 7px 13px; }
  #nexcreo-ai-overlay .ai-chips         { gap: 6px; }
  #nexcreo-ai-overlay .ai-input-section { padding: 10px 12px 14px; }
  #nexcreo-ai-overlay .ai-msg-bubble    { max-width: 94%; font-size: 13px; }
  #nexcreo-ai-overlay .ai-top-controls  { top: 12px; right: 12px; gap: 8px; }
  #nexcreo-ai-overlay .ai-ctrl-btn      { width: 34px; height: 34px; font-size: 14px; }
}


/* =============================================
   SITE-WIDE DARK / LIGHT THEME TOGGLE
   ============================================= */

/* ── Toggle button in navbar ── */
.site-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #00C6FF;
  background: transparent;
  color: #00C6FF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.25s, box-shadow 0.25s, transform 0.3s;
}
.site-theme-toggle:hover {
  background: rgba(0, 198, 255, 0.1);
  box-shadow: 0 0 16px rgba(0, 198, 255, 0.38);
  transform: rotate(20deg);
}
.site-theme-toggle svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Light mode: CSS variable overrides ── */
body.light-mode {
  --bg:     #f0f4fa;
  --bg2:    #e4eaf2;
  --white:  #0d1117;
  --muted:  #3d6080;
  --card:   #ffffff;
  --border: rgba(0, 100, 200, 0.14);
  background: var(--bg);
  color: var(--white);
}

/* Grid pattern */
body.light-mode::before {
  background-image:
    linear-gradient(rgba(0, 100, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 100, 200, 0.04) 1px, transparent 1px);
}

/* Nav */
body.light-mode nav {
  background: rgba(240, 244, 250, 0.92);
  border-bottom-color: rgba(0, 100, 200, 0.14);
}
body.light-mode .nav-logo-text    { color: #0d1117; }
body.light-mode .nav-links a      { color: #3d6080; }
body.light-mode #hamburger        { border-color: rgba(0, 100, 200, 0.2); }

/* Mobile menu */
body.light-mode #mobileMenu {
  background: rgba(240, 244, 250, 0.98);
  border-bottom-color: rgba(0, 100, 200, 0.14);
}
body.light-mode #mobileMenu a            { color: #3d6080; }
body.light-mode #mobileMenu a:hover      { color: #0d1117; background: rgba(0,0,0,0.04); }
body.light-mode #mobileMenu .mobile-cta  { background: linear-gradient(135deg,var(--cyan),var(--blue)) !important; color:#fff !important; }
body.light-mode #mobileMenu .mobile-ai   { background: rgba(0,198,255,0.07) !important; color: var(--cyan) !important; }

/* Hero */
body.light-mode .hero-desc { color: #3d6080; }
body.light-mode .hero-glow { background: radial-gradient(circle, rgba(0,87,255,0.05) 0%, transparent 70%); }

/* Stats bar */
body.light-mode .stats-bar {
  background: rgba(240, 244, 250, 0.9);
  border-color: rgba(0, 100, 200, 0.14);
}
body.light-mode .stat-label { color: #3d6080; }

/* Service cards */
body.light-mode .service-desc { color: #3d6080; }
body.light-mode .tag {
  background: rgba(0, 198, 255, 0.06);
  border-color: rgba(0, 100, 200, 0.18);
}

/* About */
body.light-mode .about-text p        { color: #3d6080; }
body.light-mode .about-metric-label  { color: #3d6080; }
body.light-mode .highlight           { color: #3d6080; }
body.light-mode .highlight strong    { color: #0d1117; }

/* Shared section text */
body.light-mode .section-sub    { color: #3d6080; }
body.light-mode .why-desc       { color: #3d6080; }
body.light-mode .why-point-desc { color: #3d6080; }

/* Contact */
body.light-mode .contact-info p { color: #3d6080; }
body.light-mode .contact-item {
  background: #ffffff;
  border-color: rgba(0, 100, 200, 0.14);
}
body.light-mode .contact-item-text        { color: #3d6080; }
body.light-mode .contact-item-text strong { color: #0d1117; }

/* Form */
body.light-mode .form-group label { color: #3d6080; }
body.light-mode .form-group input,
body.light-mode .form-group textarea,
body.light-mode .form-group select {
  background: #ffffff;
  border-color: rgba(0, 100, 200, 0.18);
  color: #0d1117;
}
body.light-mode .form-group select option { background: #f0f4fa; }
body.light-mode .form-success {
  background: #ffffff;
  border-color: rgba(0, 198, 255, 0.2);
}
body.light-mode .form-success h3 { color: #0d1117; }
body.light-mode .form-success p  { color: #3d6080; }

/* Careers */
body.light-mode .why-work-text { color: #3d6080; }
body.light-mode .job-desc      { color: #3d6080; }
body.light-mode .job-type {
  background: rgba(0, 198, 255, 0.06);
  border-color: rgba(0, 100, 200, 0.18);
}

/* Footer */
body.light-mode footer                     { border-top-color: rgba(0, 100, 200, 0.14); }
body.light-mode .footer-brand-name        { color: #0d1117; }
body.light-mode .footer-brand p           { color: #3d6080; }
body.light-mode .footer-links a           { color: #3d6080; }
body.light-mode .footer-links a:hover     { color: #0d1117; }
body.light-mode .footer-bottom            { border-top-color: rgba(0, 100, 200, 0.14); }
body.light-mode .footer-bottom p          { color: #3d6080; }
body.light-mode .social-link {
  background: #ffffff;
  border-color: rgba(0, 100, 200, 0.14);
  color: #3d6080;
}
body.light-mode .social-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 198, 255, 0.06);
}
