/* =========================================================
   HOME HERO — "Panel de diagnóstico en vivo"
   Sección exclusiva del index. No toca .page-hero (Clientes, etc.)
   ========================================================= */

.hh-hero {
  --hh-ink: #0B0E17;
  --hh-ink-soft: #12172A;
  --hh-ink-line: rgba(255, 255, 255, .08);
  --hh-violet: #4F3FF0;
  --hh-violet-soft: #8B7CFF;
  --hh-navy: #2B4FD6;
  --hh-navy-light: #7C93F5;
  --hh-coral: #FF5B3C;
  --hh-white-70: rgba(255, 255, 255, .7);
  --hh-white-55: rgba(255, 255, 255, .55);

  position: relative;
  overflow: hidden;
  background: var(--hh-ink);
  padding: 88px 0 96px;
  isolation: isolate;
}

/* grain, matching brand playbook texture */
.hh-noise {
  position: absolute;
  inset: 0;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hh-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hh-glow-a {
  width: 480px; height: 480px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, rgba(79,63,240,.45), transparent 70%);
}
.hh-glow-b {
  width: 420px; height: 420px;
  bottom: -180px; right: -100px;
  background: radial-gradient(circle, rgba(59,90,220,.28), transparent 70%);
}

.hh-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 56px;
  align-items: center;

  transform: translateY(-60px); /* Sube 40px */
}

/* ---------- Copy column ---------- */
.hh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--hh-navy);
  margin-bottom: 18px;
}
.hh-eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--hh-navy);
  box-shadow: 0 0 0 3px rgba(43,79,214,.2);
}

.hh-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: #fff;
  margin: 0 0 20px;
}
.hh-title .hh-hl {
  background: linear-gradient(90deg, var(--hh-violet-soft), var(--hh-navy-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hh-lead {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  line-height: 1.6;
  color: var(--hh-white-70);
  max-width: 46ch;
  margin: 0 0 34px;
}
.hh-lead em { color: #fff; font-style: normal; }

.hh-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 44px;
}
.hh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .88rem;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.hh-btn-primary {
  background: var(--hh-violet);
  color: #fff;
}
.hh-btn-primary:hover { background: #6152F2; transform: translateY(-1px); }
.hh-btn-ghost {
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}
.hh-btn-ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.4); }

.hh-stats {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--hh-ink-line);
}
.hh-stat { display: flex; flex-direction: column; gap: 4px; }
.hh-stat-num {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
}
.hh-stat-label {
  font-family: 'Inter', sans-serif;
  font-size: .72rem;
  line-height: 1.35;
  color: var(--hh-white-55);
  max-width: 16ch;
}

/* ---------- Panel column (signature element) ---------- */
.hh-panel {
  position: relative;
  background: var(--hh-ink-soft);
  border: 1px solid var(--hh-ink-line);
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(79,63,240,.08);
  overflow: hidden;
  top: -50px;   /* Lo sube 20px */
  left: 85px;      /* Lo mueve 30px hacia la derecha */
}

.hh-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--hh-ink-line);
}
.hh-dots { display: flex; gap: 6px; }
.hh-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.15);
}
.hh-dots span:nth-child(1) { background: #FF5B3C; opacity: .6; }
.hh-dots span:nth-child(2) { background: #F5C842; opacity: .6; }
.hh-dots span:nth-child(3) { background: #2B4FD6; opacity: .6; }
.hh-panel-file {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--hh-white-55);
  margin-right: auto;
}
.hh-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .66rem;
  color: var(--hh-navy);
}
.hh-live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--hh-navy);
  animation: hhPulse 1.8s ease-in-out infinite;
}

.hh-panel-body {
  padding: 20px 18px 6px;
  min-height: 168px;
}
.hh-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: .76rem;
  line-height: 1.9;
  color: rgba(255,255,255,.68);
  margin: 0;
  opacity: 0;
  transform: translateY(4px);
}
.hh-line strong { color: #fff; font-weight: 600; }

.hh-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 5px;
  margin: 0 2px;
}
.hh-tag-ok   { background: rgba(43,79,214,.15); color: var(--hh-navy); }
.hh-tag-med  { background: rgba(255,91,60,.14);  color: #FFB199; }
.hh-tag-high { background: rgba(255,91,60,.22);  color: #FF9E82; }
.hh-tag-crit { background: var(--hh-coral); color: #fff; }

.hh-panel-foot {
  padding: 16px 18px 22px;
  border-top: 1px solid var(--hh-ink-line);
  background: rgba(0,0,0,.15);
}
.hh-gauge-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Inter', sans-serif;
  font-size: .74rem;
  color: var(--hh-white-55);
  margin-bottom: 6px;
}
.hh-gauge-row strong {
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  font-size: .76rem;
}
.hh-gauge-row-after { margin-top: 14px; }
.hh-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
}
.hh-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(.22,.9,.32,1);
}
.hh-bar-before { background: linear-gradient(90deg, var(--hh-coral), #ff8266); }
.hh-bar-after  { background: linear-gradient(90deg, var(--hh-violet), var(--hh-navy-light)); }

.hh-disclaimer {
  font-family: 'Inter', sans-serif;
  font-size: .66rem;
  color: rgba(255,255,255,.35);
  margin: 16px 0 0;
  line-height: 1.5;
}

/* ---------- Motion ---------- */
@keyframes hhPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(43,79,214,.35); }
  50%      { opacity: .5; box-shadow: 0 0 0 4px rgba(43,79,214,0); }
}
.hh-line.hh-in {
  animation: hhLineIn .45s ease forwards;
}
@keyframes hhLineIn {
  to { opacity: 1; transform: translateY(0); }
}

.hh-copy > * { opacity: 0; transform: translateY(10px); }
.hh-hero.hh-ready .hh-copy > * {
  animation: hhLineIn .6s ease forwards;
}
.hh-hero.hh-ready .hh-eyebrow { animation-delay: .05s; }
.hh-hero.hh-ready .hh-title   { animation-delay: .12s; }
.hh-hero.hh-ready .hh-lead    { animation-delay: .22s; }
.hh-hero.hh-ready .hh-cta-row { animation-delay: .32s; }
.hh-hero.hh-ready .hh-stats   { animation-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
  .hh-copy > *, .hh-line { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hh-live-dot { animation: none; }
  .hh-bar-fill { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hh-grid { grid-template-columns: 1fr; gap: 40px; }
  .hh-hero { padding: 56px 0 64px; }
  .hh-stats { grid-template-columns: 1fr 1fr; row-gap: 20px; }
}
@media (max-width: 480px) {
  .hh-stats { grid-template-columns: 1fr; }
  .hh-cta-row { flex-direction: column; }
  .hh-btn { justify-content: center; }
}
