/* ==========================================================================
   Texvian IT — HOME 05: AI & AUTOMATION (page-specific)
   Built from the same tokens/components as every other homepage. Visual
   distinction from the other four heroes (device photo, network graph,
   browser mockup, SOC dashboard) comes from a light, chat-style "AI
   copilot" panel — a conversation plus quick-action chips — instead of
   a dashboard or product UI. Services, stats and featured-work sections
   below reuse the shared .nx-card / .nx-stat-card / .nx-media-card /
   .nx-benefit-* primitives.
   ========================================================================== */

/* ==========================================================================
   1. HERO
   ========================================================================== */

.nx-hero5 {
  position: relative;
  padding-block-start: clamp(2rem, 1.6rem + 1.5vw, 3.5rem);
  padding-block-end: var(--nx-section-space-y-sm);
  overflow: hidden;
}

.nx-hero5__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(540px 420px at 92% 8%, color-mix(in srgb, var(--nx-primary) 14%, transparent), transparent 70%),
    radial-gradient(460px 360px at 2% 92%, color-mix(in srgb, var(--nx-secondary) 14%, transparent), transparent 70%);
  opacity: 0.9;
}

.nx-hero5__row {
  position: relative;
  z-index: 1;
}

.nx-hero5__eyebrow-row {
  display: flex;
  align-items: center;
  gap: var(--nx-space-3);
  margin-bottom: var(--nx-space-5);
}

.nx-hero5__title {
  font-size: var(--nx-fs-h1);
  margin-bottom: var(--nx-space-5);
  max-width: 18ch;
}

.nx-hero5__title em {
  font-style: normal;
  color: var(--nx-primary);
}

.nx-hero5__lead {
  max-width: 46ch;
  margin-bottom: var(--nx-space-6);
}

.nx-hero5__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nx-space-3);
  margin-bottom: var(--nx-space-7);
}

.nx-hero5__stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nx-space-6);
}

.nx-hero5__stat {
  display: flex;
  flex-direction: column;
}

.nx-hero5__stat-value {
  font-family: var(--nx-font-mono);
  font-size: var(--nx-fs-h5);
  font-weight: var(--nx-fw-bold);
  color: var(--nx-text-primary);
}

.nx-hero5__stat-label {
  font-size: var(--nx-fs-sm);
  color: var(--nx-text-secondary);
}

/* ---------------- Hero visual: AI copilot chat panel ---------------- */
.nx-hero5__visual {
  position: relative;
  padding: var(--nx-space-6);
}

.nx-hero5__chat {
  position: relative;
  z-index: 1;
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-lg);
  box-shadow: var(--nx-shadow-lg);
  overflow: hidden;
}

.nx-hero5__chat-head {
  display: flex;
  align-items: center;
  gap: var(--nx-space-3);
  padding: var(--nx-space-4) var(--nx-space-5);
  border-bottom: 1px solid var(--nx-border-color);
}

.nx-hero5__chat-avatar {
  --size: 32px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--nx-primary-soft);
  color: var(--nx-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nx-hero5__chat-title {
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-semibold);
  color: var(--nx-text-primary);
  margin: 0;
}

.nx-hero5__chat-status {
  display: inline-flex;
  align-items: center;
  gap: var(--nx-space-1);
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-secondary);
}

.nx-hero5__chat-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nx-success);
}

.nx-hero5__chat-body {
  padding: var(--nx-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--nx-space-4);
}

.nx-hero5__msg {
  max-width: 82%;
  padding: var(--nx-space-3) var(--nx-space-4);
  border-radius: var(--nx-radius-md);
  font-size: var(--nx-fs-sm);
  line-height: 1.5;
}

.nx-hero5__msg--user {
  align-self: flex-end;
  background: var(--nx-primary);
  color: var(--nx-white);
  border-bottom-right-radius: var(--nx-radius-xs, 4px);
}

.nx-hero5__msg--ai {
  align-self: flex-start;
  background: var(--nx-surface-alt);
  color: var(--nx-text-primary);
  border-bottom-left-radius: var(--nx-radius-xs, 4px);
}

.nx-hero5__msg--ai .nx-hero5__msg-action {
  display: inline-flex;
  align-items: center;
  gap: var(--nx-space-2);
  margin-top: var(--nx-space-3);
  padding: var(--nx-space-2) var(--nx-space-3);
  background: var(--nx-success-soft);
  color: var(--nx-success);
  border-radius: var(--nx-radius-sm);
  font-size: var(--nx-fs-xs);
  font-weight: var(--nx-fw-semibold);
}

.nx-hero5__typing {
  display: inline-flex;
  gap: 4px;
  align-self: flex-start;
  padding: var(--nx-space-3) var(--nx-space-4);
  background: var(--nx-surface-alt);
  border-radius: var(--nx-radius-md);
  border-bottom-left-radius: var(--nx-radius-xs, 4px);
}

.nx-hero5__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nx-text-secondary);
  opacity: 0.5;
  animation: nx-hero5-typing 1.2s ease-in-out infinite;
}

.nx-hero5__typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.nx-hero5__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes nx-hero5-typing {

  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.nx-hero5__chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--nx-space-2);
  padding: 0 var(--nx-space-5) var(--nx-space-5);
}

.nx-hero5__chip {
  padding: var(--nx-space-2) var(--nx-space-3);
  background: var(--nx-surface-alt);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-pill);
  font-size: var(--nx-fs-xs);
  color: var(--nx-text-secondary);
}

/* Floating stat badge */
.nx-hero5__badge-float {
  position: absolute;
  top: -14px;
  right: 4%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--nx-space-2);
  padding: var(--nx-space-3) var(--nx-space-4);
  background: var(--nx-ink-900);
  color: var(--nx-white);
  border-radius: var(--nx-radius-md);
  box-shadow: var(--nx-shadow-md);
}

.nx-hero5__badge-float-icon {
  color: var(--nx-circuit-400);
  font-size: 1.1rem;
}

.nx-hero5__badge-float-text strong {
  display: block;
  font-family: var(--nx-font-mono);
  font-size: var(--nx-fs-md);
  line-height: 1.2;
}

.nx-hero5__badge-float-text span {
  font-size: var(--nx-fs-xs);
  color: var(--nx-slate-400);
}

@media (max-width: 767.98px) {
  .nx-hero5__badge-float {
    position: static;
    margin-bottom: var(--nx-space-4);
    width: fit-content;
  }
}

/* ==========================================================================
   2. AUTOMATION FLOW STRIP (simple 3-node visual used in the About section)
   ========================================================================== */

.nx-ai-flow {
  display: flex;
  align-items: center;
  gap: var(--nx-space-3);
  flex-wrap: wrap;
}

.nx-ai-flow__node {
  display: flex;
  align-items: center;
  gap: var(--nx-space-2);
  padding: var(--nx-space-3) var(--nx-space-4);
  background: var(--nx-surface);
  border: 1px solid var(--nx-border-color);
  border-radius: var(--nx-radius-pill);
  font-size: var(--nx-fs-sm);
  font-weight: var(--nx-fw-medium);
  color: var(--nx-text-primary);
}

.nx-ai-flow__node i {
  color: var(--nx-primary);
}

.nx-ai-flow__arrow {
  color: var(--nx-text-secondary);
  font-size: 1.1rem;
}