/* ============================================================
   HERO.CSS
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--navbar-h);
  position: relative;
  overflow: hidden;
}

/* ── Fondo ── */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 30%, rgba(27,110,243,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 90% 80%, rgba(245,158,11,0.06) 0%, transparent 60%),
    var(--bg);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27,110,243,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,110,243,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

.hero-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Línea diagonal decorativa ── */
.hero-diagonal {
  position: absolute;
  right: -10%;
  top: -10%;
  width: 55%;
  height: 130%;
  background: linear-gradient(135deg, rgba(27,110,243,0.06) 0%, transparent 60%);
  border-left: 1px solid rgba(27,110,243,0.12);
  transform: rotate(-8deg);
  transform-origin: top right;
  pointer-events: none;
}

/* ── Contenido ── */
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  padding-block: var(--space-20);
}

.hero-content {
  max-width: 620px;
}

/* ── Overline ── */
.hero-overline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s var(--ease) both;
}

/* ── Headline ── */
.hero-title {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s 0.1s var(--ease) both;
}

.hero-title .highlight {
  color: var(--primary-light);
  position: relative;
  display: inline-block;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineReveal 0.6s 0.9s var(--ease) forwards;
}

@keyframes underlineReveal {
  to { transform: scaleX(1); }
}

/* ── Subtítulo ── */
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.8s 0.2s var(--ease) both;
}

/* ── CTAs ── */
.hero-ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-10);
  animation: fadeInUp 0.8s 0.3s var(--ease) both;
}

/* ── Tags de tecnologías ── */
.hero-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.4s var(--ease) both;
}

/* ── Panel derecho: Stats ── */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  animation: fadeInUp 0.8s 0.2s var(--ease) both;
}

.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--t-base), box-shadow var(--t-base);
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--t-base);
}

.hero-card:hover {
  border-color: rgba(27,110,243,0.3);
  box-shadow: var(--glow-primary);
}

.hero-card:hover::before {
  opacity: 1;
}

.hero-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.hero-stat {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.hero-stat-number .counter {
  color: var(--primary-light);
}

.hero-stat-unit {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-secondary);
}

.hero-stat-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* Status bar dentro de una card */
.hero-status {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.status-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s ease infinite;
}

.status-dot.warning { background: var(--accent); }
.status-dot.info    { background: var(--primary-light); }

/* ── Scroll indicator ── */
.hero-scroll {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  z-index: 1;
  animation: fadeInUp 1s 1s var(--ease) both;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollLine 2s ease infinite;
}

@keyframes scrollLine {
  0%   { opacity: 1; transform: scaleY(1); transform-origin: top; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: top; }
}

/* ── Keyframes compartidos ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--space-10);
    padding-block: var(--space-16);
  }

  .hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-diagonal { display: none; }
}

@media (max-width: 600px) {
  .hero-visual {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 3.5rem);
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Responsive adicional hero ── */
@media (max-width: 480px) {
  .hero .container {
    padding-block: var(--space-12);
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-visual {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .hero-tags {
    gap: var(--space-1);
  }

  .hero-overline {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .hero-stat-number {
    font-size: 2.2rem;
  }
}
