/* ==========================================================================
   HERO InspecBot — V4.1 Refinada (Direção Cledson / Fable)
   - Fundo: Foto da inspetora com tablet (inspecao-residencial-v1.png)
     centralizada na figura humana (background-position: 32% center),
     com lado direito clareado e gradiente azul-marinho protetor à esquerda.
   - Grade técnica do editorial do CF sutil por cima.
   - Card minimalista animado sincronizado 100% (Recebida > Lançando > Concluída).
   - Movimento suave ativo no prefers-reduced-motion (sem deslocamento espacial).
   ========================================================================== */

.hx-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding: clamp(96px, 11vh, 128px) 0 clamp(56px, 7vh, 80px);
  background: #070d1e;
  color: var(--text-dark-heading);
}

.hx-hero > .container {
  width: 100%;
}

/* ---------- Camadas de Fundo ---------- */
.hx-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Foto da Inspetora Real em Campo - Enquadramento Preciso na Pessoa com Tablet */
.hx-photo-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  width: 68%;
  height: 100%;
  background-image: url('assets/inspecao-residencial-v1.png');
  background-position: 32% center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.54;
  mix-blend-mode: luminosity;
  filter: contrast(1.15) brightness(1.05);
}

/* Gradiente de Proteção: Escuro à esquerda para leitura, clareia à direita para ver a inspetora */
.hx-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #070d1e 0%,
    #070d1e 32%,
    rgba(7, 13, 30, 0.82) 48%,
    rgba(7, 13, 30, 0.22) 78%,
    rgba(7, 13, 30, 0.08) 100%
  );
}

/* Grade Técnica do Editorial CF */
.hx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(56, 189, 248, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.10) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px, 130px 130px, 130px 130px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 85%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 40%, transparent 85%);
}

.hx-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.40;
}
.hx-glow-a {
  width: 500px;
  height: 500px;
  left: -120px;
  top: 80px;
  background: rgba(2, 132, 199, 0.28);
}
.hx-glow-b {
  width: 440px;
  height: 440px;
  right: -80px;
  top: 180px;
  background: rgba(37, 99, 235, 0.20);
}

/* ---------- Grid Split em 2 Colunas ---------- */
.hx-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* ---------- Textos do Hero (Coluna da Esquerda) ---------- */
.hx-copy {
  max-width: 600px;
  text-align: left;
  margin: 0;
}

.hx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-cyan-glow);
  box-shadow: 0 0 10px var(--color-cyan-glow);
  animation: hx-pulse 2.2s ease-in-out infinite;
}
@keyframes hx-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hx-title {
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hx-line {
  display: block;
}
.hx-grad {
  background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 55%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hx-sub {
  font-size: clamp(1.05rem, 1.3vw, 1.22rem);
  font-weight: 600;
  color: #bae6fd;
  margin: 0 0 12px;
  line-height: 1.45;
}
.hx-lead {
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.6;
  margin: 0 0 28px;
}

.hx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}
.hx-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.32);
  font-weight: 700;
}
.hx-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 10px 16px;
  border-radius: 8px;
  transition: color var(--transition-fast);
  text-decoration: none;
}
.hx-link:hover {
  color: #ffffff;
}

/* ---------- Coluna da Direita: Palco do Card Minimalista ---------- */
.hx-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* Card Minimalista e Leve sobre a Foto */
.hx-mini-card {
  position: relative;
  background: rgba(10, 20, 48, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 380px;
  width: 100%;
  text-align: left;
}

/* Barra Superior Discreta */
.hx-mini-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hx-mini-brand {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hx-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
.hx-mini-name {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
  letter-spacing: 0.04em;
}

/* Badge de Status Vivo */
.hx-mini-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  transition: all 0.4s ease;
}
.hx-mini-status-badge.is-running {
  color: #fde047;
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(234, 179, 8, 0.4);
}
.hx-mini-status-badge.is-done {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.4);
}

.hx-beacon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* Corpo do Card */
.hx-mini-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hx-mini-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #38bdf8;
  text-transform: uppercase;
}
.hx-mini-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

/* Esteira Linear: 1. Recebida -> 2. Lançando -> 3. Concluída */
.hx-mini-pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hx-pipe-node {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  transition: all 0.4s ease;
}
.hx-node-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  transition: all 0.4s ease;
}
.hx-pipe-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
}

.hx-pipe-node.is-active {
  color: #e2e8f0;
}
.hx-pipe-node.is-active .hx-node-circle {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
}

.hx-pipe-node.is-done {
  color: #34d399;
}
.hx-pipe-node.is-done .hx-node-circle {
  background: #10b981;
  color: #052e1f;
}
.hx-pipe-line.is-done {
  background: #10b981;
}

/* Rodapé Aprovado */
.hx-mini-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #cbd5e1;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.hx-foot-check {
  color: #34d399;
  flex: none;
}

/* ---------- Entrada em Cascata ---------- */
.hx-in {
  opacity: 0;
  transform: translateY(16px);
  animation: hx-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--d, 0) * 90ms + 80ms);
}
@keyframes hx-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsividade Fluida (0 Estouro / 0 Corte) ---------- */
@media (max-width: 960px) {
  .hx-hero-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hx-copy {
    text-align: center;
    margin: 0 auto;
  }
  .hx-actions {
    justify-content: center;
  }
  .hx-stage {
    justify-content: center;
  }
  .hx-mini-card {
    margin: 0 auto;
    max-width: 400px;
  }
  .hx-photo-backdrop {
    width: 100%;
    opacity: 0.42;
    background-position: 32% 15%;
  }
  .hx-gradient-overlay {
    background: linear-gradient(
      180deg,
      rgba(7, 13, 30, 0.88) 0%,
      rgba(7, 13, 30, 0.62) 35%,
      rgba(7, 13, 30, 0.92) 100%
    );
  }
}

@media (max-width: 640px) {
  .hx-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }
  .hx-title {
    font-size: clamp(2rem, 8vw, 2.5rem);
  }
  .hx-actions {
    flex-direction: column;
    width: 100%;
  }
  .hx-cta {
    width: 100%;
    justify-content: center;
  }
  .hx-mini-card {
    padding: 16px 18px;
  }
}

/* ---------- Modo Reduzido (prefers-reduced-motion: reduce) ---------- */
/* Importante: Mantém transições de cores, estados e iluminação das etapas vivas */
@media (prefers-reduced-motion: reduce) {
  .hx-in {
    transform: none !important;
    animation: hx-fade 0.5s ease forwards;
    animation-delay: calc(var(--d, 0) * 50ms);
  }
  .hx-dot {
    animation: none !important;
  }
  .hx-mini-status-badge,
  .hx-pipe-node,
  .hx-node-circle,
  .hx-pipe-line {
    transform: none !important;
    transition: opacity 0.4s ease, background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease !important;
  }
}
@keyframes hx-fade {
  to { opacity: 1; }
}
