/* Axencia.co — Hero: Interactive & Impressive */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-height) + 80px) 32px 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  top: 20%;
  left: 10%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  animation: heroOrbFloat 8s ease-in-out infinite;
}

.hero-bg::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  bottom: 25%;
  right: 15%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  animation: heroOrbFloat 10s ease-in-out infinite reverse 2s;
}

.hero-float {
  position: absolute;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  pointer-events: none;
}

.hero-float-1 { width: 12px; height: 12px; top: 18%; left: 22%; animation: heroFloat1 6s ease-in-out infinite; }
.hero-float-2 { width: 8px; height: 8px; top: 35%; right: 25%; animation: heroFloat2 7s ease-in-out infinite 1s; }
.hero-float-3 { width: 6px; height: 6px; bottom: 30%; left: 18%; animation: heroFloat1 5s ease-in-out infinite 2s; }
.hero-float-4 { width: 10px; height: 10px; bottom: 22%; right: 20%; animation: heroFloat2 8s ease-in-out infinite 0.5s; }
.hero-float-5 { width: 4px; height: 4px; top: 50%; left: 8%; animation: heroFloat1 9s ease-in-out infinite 3s; }

/* Light beams */
.hero-beam {
  position: absolute;
  width: 2px;
  height: 120%;
  top: -10%;
  background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.15), transparent);
  animation: heroBeamSweep 8s ease-in-out infinite;
  pointer-events: none;
}

.hero-beam-1 { left: 15%; animation-delay: 0s; }
.hero-beam-2 { right: 20%; animation-delay: 4s; animation-direction: reverse; }

@keyframes heroBeamSweep {
  0%, 100% { opacity: 0.3; transform: translateX(0) scaleY(0.8); }
  50% { opacity: 0.8; transform: translateX(10px) scaleY(1); }
}

/* Shine sweep overlay */
.hero-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.03) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: heroShineSweep 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroShineSweep {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -100% 0; }
}

@keyframes heroFloat1 {
  0%, 100% { transform: translate(0, 0); opacity: 0.6; }
  50% { transform: translate(20px, -30px); opacity: 1; }
}

@keyframes heroFloat2 {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(-25px, 20px); opacity: 0.9; }
}

@keyframes heroOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  33% { transform: translate(30px, -40px) scale(1.1); opacity: 1; }
  66% { transform: translate(-20px, 25px) scale(0.95); opacity: 0.9; }
}

.hero-grid {
  will-change: opacity;
  animation: heroGridPulse 3s ease-in-out infinite;
}

@keyframes heroGridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero-glow {
  will-change: transform, opacity;
  animation: heroGlowPulse 4s ease-in-out infinite;
}

@keyframes heroGlowPulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.2); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-bottom: 28px;
  padding: 10px 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 100px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  animation: heroBadgeReveal 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
  position: relative;
  overflow: hidden;
}

.hero-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: heroBadgeShine 4s ease-in-out infinite;
}

@keyframes heroBadgeShine {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

.hero-badge:hover {
  border-color: rgba(59, 130, 246, 0.4);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
  transition: all 0.35s ease;
}

@keyframes heroBadgeReveal {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  animation: heroLineReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 0.35s; }
.hero-title .line:nth-child(2) { animation-delay: 0.5s; }
.hero-title .line:nth-child(3) { animation-delay: 0.65s; }

@keyframes heroLineReveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero-title .accent {
  background: linear-gradient(135deg, #60a5fa, #38bdf8, #06b6d4, #60a5fa);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  will-change: background-position;
  animation: heroAccentShimmer 3s linear infinite;
}

@keyframes heroAccentShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Rotating words — infinite loop, smooth transitions */
.hero-rotate-wrap {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
  min-width: 6ch;
  min-height: 1.2em;
  text-align: left;
}

.hero-rotate {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  animation: heroRotateWord 6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  background: linear-gradient(135deg, #60a5fa, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-rotate:nth-child(1) { animation-delay: 0s; }
.hero-rotate:nth-child(2) { animation-delay: 2s; }
.hero-rotate:nth-child(3) { animation-delay: 4s; }

@keyframes heroRotateWord {
  0% { opacity: 0; transform: translateY(6px); }
  8% { opacity: 1; transform: translateY(0); }
  25% { opacity: 1; transform: translateY(0); }
  33% { opacity: 0; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(6px); }
}

.hero-desc {
  font-size: 1.2rem;
  color: #94a3b8;
  max-width: 580px;
  margin: 0 auto 48px;
  line-height: 1.7;
  opacity: 0;
  animation: heroLineReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s forwards;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: heroLineReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards;
}

.hero-actions .btn-primary {
  padding: 18px 36px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  background-size: 200% 200%;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 
    0 8px 32px rgba(59, 130, 246, 0.4),
    0 0 0 1px rgba(255,255,255,0.08) inset;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  animation: heroBtnGlow 5s ease-in-out infinite;
}

@keyframes heroBtnGlow {
  0%, 100% { box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4), 0 0 0 1px rgba(255,255,255,0.08) inset; }
  50% { box-shadow: 0 8px 40px rgba(59, 130, 246, 0.5), 0 0 30px rgba(59, 130, 246, 0.15), 0 0 0 1px rgba(255,255,255,0.08) inset; }
}

.hero-actions .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
}

.hero-actions .btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(59, 130, 246, 0.5),
    0 0 60px rgba(59, 130, 246, 0.2);
}

.hero-actions .btn-primary:hover::before {
  opacity: 1;
}

.hero-actions .btn-ghost {
  padding: 18px 36px;
  font-size: 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-actions .btn-ghost:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.08);
  transform: translateY(-4px);
}

.hero-stats {
  display: flex;
  gap: 56px;
  margin-top: 72px;
  padding: 32px 48px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 20px;
  opacity: 0;
  animation: heroLineReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.15s forwards, heroStatsPulse 4s ease-in-out infinite 2s;
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.08);
}

@keyframes heroStatsPulse {
  0%, 100% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.08); }
  50% { box-shadow: 0 0 60px rgba(59, 130, 246, 0.12); }
}

.hero-stats .stat {
  padding: 0 24px;
  border-right: 1px solid rgba(59, 130, 246, 0.15);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-stats .stat:last-child {
  border-right: none;
}

.hero-stats .stat:hover {
  transform: scale(1.08) translateY(-2px);
  text-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.scroll-indicator {
  margin-top: 48px;
  opacity: 0;
  animation: heroLineReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s forwards;
}

.scroll-indicator span {
  display: inline-block;
  animation: heroScrollBounce 2s ease-in-out infinite;
}

.scroll-indicator .scroll-line {
  transform-origin: top;
  animation: scrollLinePulse 2s ease-in-out infinite;
}

@keyframes scrollLinePulse {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes heroScrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 768px) {
  .hero { padding: calc(var(--nav-height) + 48px) 20px 60px; }
  .hero-stats { flex-direction: column; gap: 0; padding: 24px; margin-top: 48px; }
  .hero-stats .stat { border-right: none; border-bottom: 1px solid rgba(59, 130, 246, 0.15); padding: 20px 0; }
  .hero-stats .stat:last-child { border-bottom: none; }
  .hero-actions .btn-primary, .hero-actions .btn-ghost { padding: 16px 28px; font-size: 1rem; }
}
