/* ==========================================================================
   MODULO: hero.css
   Sección principal (Hero), fondo animado, logo central animado y métricas
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 72px 0 88px 0;
  overflow: hidden;
}

.hero-bg-layers {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg, #EEF4FA 0%, #F5F5F7 100%);
}

.bg-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 102, 204, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 102, 204, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 45%, transparent 85%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  opacity: 0.55;
  animation: orbFloat 16s ease-in-out infinite alternate;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.35) 0%, transparent 70%);
  top: -120px;
  left: -100px;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 168, 232, 0.3) 0%, transparent 70%);
  bottom: -150px;
  right: -120px;
  animation-delay: -6s;
  animation-duration: 20s;
}

.orb-3 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.22) 0%, transparent 70%);
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  animation: centerGlow 6s ease-in-out infinite alternate;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(60px, 40px) scale(1.12);
  }
  100% {
    transform: translate(-30px, 70px) scale(0.95);
  }
}

@keyframes centerGlow {
  0% {
    opacity: 0.35;
    transform: translateX(-50%) scale(0.9);
  }
  100% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1.18);
  }
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

/* Emblema Central Animado (Sin artefactos de fondo blanco) */
.hero-logo-showcase {
  position: relative;
  width: 124px;
  height: 124px;
  margin: 0 auto 28px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  animation: fadeScaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pulsar-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  pointer-events: none;
  z-index: 1;
}

.pulsar-rings .ring {
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 28px;
  background: transparent;
  border: 2px solid rgba(0, 102, 204, 0.55);
  opacity: 0;
  animation: pulsarRipple 3.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.pulsar-rings .ring-2 {
  animation-delay: 1.2s;
}

.pulsar-rings .ring-3 {
  animation-delay: 2.4s;
}

@keyframes pulsarRipple {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

.hero-logo-emblem {
  position: relative;
  z-index: 2;
  width: 104px;
  height: 104px;
  border-radius: 28px;
  background: linear-gradient(135deg, #0077ED 0%, #004494 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 
    0 16px 36px rgba(0, 102, 204, 0.36),
    inset 0 2px 4px rgba(255, 255, 255, 0.3);
  animation: emblemFloat 3.6s ease-in-out infinite;
}

@keyframes emblemFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 
      0 16px 36px rgba(0, 102, 204, 0.34),
      inset 0 2px 4px rgba(255, 255, 255, 0.3);
  }
  50% {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 
      0 22px 44px rgba(0, 136, 255, 0.5),
      0 0 20px rgba(0, 168, 232, 0.35),
      inset 0 2px 5px rgba(255, 255, 255, 0.45);
  }
}

.pulse-svg {
  background: transparent !important;
  overflow: visible;
}

.pulse-track {
  fill: none !important;
  background: transparent !important;
}

.pulse-path {
  fill: none !important;
  background: transparent !important;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawPulseClean 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes drawPulseClean {
  0% {
    stroke-dashoffset: 100;
    opacity: 0.3;
  }
  15% {
    opacity: 1;
  }
  50%, 70% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -100;
    opacity: 0.2;
  }
}

/* Título Principal de la Empresa */
.hero-company-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
  animation: fadeUp 0.85s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.company-word-main {
  font-size: 4.8rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--color-dark);
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.company-word-sub {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  margin-top: 8px;
  padding-left: 0.32em;
  background: linear-gradient(90deg, var(--color-primary) 0%, #00A8E8 50%, var(--color-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 5s linear infinite;
}

@keyframes textShimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.hero-tagline {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--color-dark-secondary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  animation: fadeUp 0.85s 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--color-gray);
  max-width: 640px;
  margin: 0 auto 36px auto;
  animation: fadeUp 0.85s 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 52px;
  animation: fadeUp 0.85s 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.stat-item {
  text-align: center;
  padding: 0 12px;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--color-border);
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--color-primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-dark-secondary);
  margin-top: 4px;
}

@media (max-width: 960px) {
  .company-word-main {
    font-size: 3.8rem;
  }
  .company-word-sub {
    font-size: 1.35rem;
  }
}

@media (max-width: 768px) {
  .company-word-main {
    font-size: 2.9rem;
  }
  .company-word-sub {
    font-size: 1.05rem;
    letter-spacing: 0.22em;
    padding-left: 0.22em;
  }
  .hero-tagline {
    font-size: 1.3rem;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 22px 16px;
  }
  .stat-item:nth-child(2) {
    border-right: none;
  }
}

@media (max-width: 580px) {
  .hero-section {
    padding: 48px 0 60px 0;
  }
  .company-word-main {
    font-size: 2.35rem;
  }
  .company-word-sub {
    font-size: 0.88rem;
    letter-spacing: 0.18em;
    padding-left: 0.18em;
  }
}

@media (max-width: 380px) {
  .hero-logo-showcase {
    width: 104px;
    height: 104px;
  }
  .hero-logo-emblem,
  .pulsar-rings .ring {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }
  .company-word-main {
    font-size: 2rem;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .stat-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 10px;
  }
}
