/* HeroFlow — carrusel 3D de heros en 03 // EVIDENCIA (Casos Reales) */
.hf {
  --hf-w: min(46vw, 640px);
  position: relative;
  overflow: hidden;
  background: #080808;
  font-family: 'Inter', sans-serif;
}

/* Muro de texto en movimiento detrás de las tarjetas */
.hf-marq {
  position: absolute;
  left: 0;
  top: 10%;
  display: flex;
  width: max-content;
  font: 800 clamp(3.5rem, 8vw, 8.5rem)/1 'Montserrat', sans-serif;
  letter-spacing: -0.02em;
  color: rgba(157, 78, 221, 0.24);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  animation: hf-marq 38s linear infinite;
}
.hf-marq span { padding-right: 0.25em; }
.hf-marq--rev { top: 42%; animation-direction: reverse; }
@keyframes hf-marq { to { transform: translateX(-50%); } }

.hf-stage {
  position: absolute;
  inset: 0 0 132px 0;
  perspective: 1600px;
  touch-action: pan-y;
}

.hf-frame {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hf-w);
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1), opacity 1.1s cubic-bezier(0.65, 0, 0.35, 1), border-color 0.4s;
  will-change: transform, opacity;
}
.hf-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}
.hf-frame.is-front { border-color: color-mix(in srgb, var(--hf-c) 70%, transparent); }
.hf-frame.is-front:hover { box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--hf-c); }
.hf-frame:focus-visible { outline: 2px solid #c3f400; outline-offset: 4px; }

/* Pie con nombre, descripción y enlace del sitio al frente */
.hf-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 132px;
  padding: 16px max(16px, 2rem) 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: 80rem;
  margin: 0 auto;
}
.hf-cap-text { min-width: 0; max-width: 46rem; display: flex; flex-direction: column; gap: 6px; }
.hf-title {
  margin: 0;
  font: 900 clamp(1.4rem, 2.6vw, 2.2rem)/1.05 'Montserrat', sans-serif;
  letter-spacing: -0.02em;
  color: #fff;
  text-transform: uppercase;
  text-wrap: balance;
}
.hf-desc { margin: 0; font-size: 0.95rem; line-height: 1.45; color: #c4c9ac; }
.hf-link {
  align-self: flex-start;
  font: 500 0.85rem 'JetBrains Mono', monospace;
  color: #c3f400;
  text-decoration: none;
}
.hf-link:hover, .hf-link:focus-visible { text-decoration: underline; }

.hf-nav { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hf-count { font: 500 0.85rem 'JetBrains Mono', monospace; color: #c4c9ac; font-variant-numeric: tabular-nums; margin-right: 6px; }
.hf-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.hf-btn:hover, .hf-btn:focus-visible { background: #c3f400; color: #080808; border-color: #c3f400; outline: none; }

@media (max-width: 700px) {
  .hf { --hf-w: 78vw; }
  .hf-stage { bottom: 168px; }
  .hf-cap { flex-direction: column; align-items: flex-start; min-height: 168px; gap: 12px; }
  .hf-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .hf-marq { animation: none; }
  .hf-frame { transition: opacity 0.3s; }
}
