/* ==========================================================================
   HERO SHOWCASE — "AI Command Center"
   A live, animated product preview: an AI agent executing a real workflow.
   Clean, compact 20px-30px padding, fully responsive & mobile-optimized.
   ========================================================================== */

.hero-visual {
  --hv-navy: #0b132b;
  --hv-navy-2: #0f1b3d;
  --hv-navy-3: #16244d;
  --hv-orange: #ff9500;
  --hv-cyan: #22d3ee;
  --hv-green: #34d399;
  --hv-blue: #2563eb;
  position: relative;
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  perspective: 1200px;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Ambient glows ---------- */
.hv-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.32;
  z-index: -2;
  pointer-events: none;
}

.hv-glow-blue {
  width: 300px;
  height: 300px;
  top: -8%;
  right: -4%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.65) 0%, transparent 70%);
}

.hv-glow-orange {
  width: 260px;
  height: 260px;
  bottom: -4%;
  left: -4%;
  background: radial-gradient(circle, rgba(255, 149, 0, 0.45) 0%, transparent 70%);
  opacity: 0.22;
}

/* ---------- Window wrapper & 3D tilt ---------- */
.hv-window-wrap {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Main window ---------- */
.hv-window {
  background: linear-gradient(165deg, #0e1738 0%, #090e24 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #ffffff;
  overflow: hidden;
  box-shadow:
    0 24px 60px -12px rgba(5, 10, 25, 0.7),
    0 8px 24px -8px rgba(37, 99, 235, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Window title bar */
.hv-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.hv-dots {
  display: inline-flex;
  gap: 6px;
}

.hv-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: block;
}

.hv-dots i:nth-child(1) { background: #ff5f57; box-shadow: 0 0 5px rgba(255, 95, 87, 0.4); }
.hv-dots i:nth-child(2) { background: #febc2e; box-shadow: 0 0 5px rgba(254, 188, 46, 0.4); }
.hv-dots i:nth-child(3) { background: #28c840; box-shadow: 0 0 5px rgba(40, 200, 64, 0.4); }

.hv-window-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hv-green);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.hv-live .status-dot {
  width: 6px;
  height: 6px;
  background: var(--hv-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--hv-green);
  animation: hvPulse 1.8s ease-in-out infinite;
}

/* Window content body - compact 20px padding */
.hv-window-body {
  padding: 20px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* User chat bubble */
.hv-msg-user {
  align-self: flex-end;
  max-width: 90%;
  padding: 10px 14px;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 6px 20px -6px rgba(37, 99, 235, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: opacity 0.3s ease;
}

.hv-msg-user:empty {
  opacity: 0;
  padding: 0;
}

.hv-msg-user.typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 0.95em;
  margin-left: 2px;
  vertical-align: -2px;
  background: #ffffff;
  animation: hvCaret 0.8s steps(1) infinite;
}

/* AI Agent reply container */
.hv-msg-ai {
  align-self: stretch;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px 14px 14px 4px;
  opacity: 1;
  transform: translateY(0);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hv-msg-ai.show,
.hv-msg-ai.running {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 4px 20px -4px rgba(37, 99, 235, 0.25);
}

.hv-ai-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.hv-ai-head img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px;
}

.hv-ai-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.hv-ai-status {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

.hv-ai-status.done {
  color: var(--hv-green);
  background: rgba(52, 211, 153, 0.12);
}

/* Workflow step list */
.hv-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hv-steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

.hv-ico {
  position: relative;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  transition: all 0.3s ease;
}

.hv-step-meta {
  margin-left: auto;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.hv-steps li.running {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.12);
}

.hv-steps li.running .hv-ico {
  border-color: rgba(255, 149, 0, 0.3);
  border-top-color: var(--hv-orange);
  animation: hvSpin 0.8s linear infinite;
}

.hv-steps li.done {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.04);
}

.hv-steps li.done .hv-ico {
  background: var(--hv-cyan);
  border-color: var(--hv-cyan);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.hv-steps li.done .hv-ico::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1.5px;
  width: 4px;
  height: 7px;
  border: solid var(--hv-navy);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.hv-steps li.done .hv-step-meta {
  color: var(--hv-cyan);
  background: rgba(34, 211, 238, 0.14);
}

/* Progress bar */
.hv-progress {
  height: 4px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.hv-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #2563eb, #06b6d4 70%, var(--hv-orange));
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Result announcement box */
.hv-result {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 9px;
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  overflow: hidden;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.hv-result.show {
  opacity: 1;
  max-height: 80px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-top: 10px;
}

/* Input prompt bar */
.hv-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 18px 18px;
  padding: 6px 6px 6px 14px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.hv-input:focus-within {
  border-color: rgba(37, 99, 235, 0.6);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.hv-input input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  padding-right: 8px;
}

.hv-input input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.hv-send {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  outline: none;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 4px 14px -3px rgba(37, 99, 235, 0.65);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hv-send:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 18px -2px rgba(37, 99, 235, 0.85);
}

/* ---------- Keyframe Animations ---------- */
@keyframes hvSpin {
  to { transform: rotate(360deg); }
}

@keyframes hvPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

@keyframes hvCaret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- Mobile Responsiveness ---------- */
@media (max-width: 1024px) {
  .hero-visual {
    max-width: 500px;
    margin-top: 16px;
  }
}

@media (max-width: 640px) {
  .hero-visual {
    max-width: 100%;
    margin-top: 14px;
  }

  .hv-window {
    border-radius: 14px;
  }

  .hv-window-bar {
    padding: 10px 14px;
    gap: 8px;
  }

  .hv-window-title {
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 175px;
  }

  .hv-live {
    font-size: 0.6rem;
    padding: 2px 6px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .hv-window-body {
    padding: 12px;
    gap: 9px;
  }

  .hv-msg-user {
    font-size: 0.78rem;
    padding: 8px 11px;
    max-width: 95%;
  }

  .hv-msg-ai {
    padding: 10px;
  }

  .hv-ai-name {
    font-size: 0.78rem;
  }

  .hv-steps li {
    font-size: 0.75rem;
    padding: 4px 6px;
    gap: 7px;
  }

  .hv-step-meta {
    font-size: 0.58rem;
    padding: 1px 5px;
  }

  .hv-result {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .hv-input {
    margin: 0 12px 12px;
    padding: 6px 8px 6px 12px;
    font-size: 0.75rem;
  }

  .hv-send {
    width: 26px;
    height: 26px;
  }
}
