/* ============================================================
   ANIMATIONS — Zero Trust Compliance Portal
   ============================================================ */

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.92); }
}

@keyframes hexGlow {
  0%, 100% { opacity: 0.8; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
}

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes scanDown {
  0% { top: -3px; opacity: 1; }
  70% { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInFromBottom {
  from { opacity: 0; transform: translateY(60px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes slideInFromLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -1px); }
  100% { transform: translate(0); }
}

@keyframes borderPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
  50% { box-shadow: 0 0 0 6px rgba(0, 212, 255, 0.08); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes counterFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes typewriterCaret {
  0%, 100% { border-right-color: transparent; }
  50% { border-right-color: var(--cyan, #00d4ff); }
}

@keyframes waveform {
  0% { transform: scaleY(1); }
  25% { transform: scaleY(2); }
  50% { transform: scaleY(0.5); }
  75% { transform: scaleY(1.8); }
  100% { transform: scaleY(1); }
}

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.scan-line {
  position: fixed;
  top: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0,212,255,0.5) 20%,
    var(--cyan, #00d4ff) 50%,
    rgba(0,212,255,0.5) 80%,
    transparent 100%
  );
  z-index: 9999;
  pointer-events: none;
  animation: scanDown 1.4s ease-out forwards;
}

.hero-text .hero-greeting { animation: fadeInLeft 0.6s ease 0.1s both; }
.hero-text .hero-name     { animation: fadeInLeft 0.6s ease 0.2s both; }
.hero-text .hero-typing-wrap { animation: fadeInLeft 0.6s ease 0.35s both; }
.hero-text .hero-bio      { animation: fadeInLeft 0.6s ease 0.45s both; }
.hero-text .hero-badges   { animation: fadeInLeft 0.6s ease 0.55s both; }
.hero-text .hero-cta      { animation: fadeInLeft 0.6s ease 0.65s both; }
.hero-photo-wrap          { animation: fadeInRight 0.8s ease 0.2s both; }
.kpi-card:nth-child(1)    { animation: fadeInUp 0.5s ease 0.6s both; }
.kpi-card:nth-child(2)    { animation: fadeInUp 0.5s ease 0.7s both; }
.kpi-card:nth-child(3)    { animation: fadeInUp 0.5s ease 0.8s both; }
.kpi-card:nth-child(4)    { animation: fadeInUp 0.5s ease 0.9s both; }

.sidebar-profile          { animation: fadeIn 0.6s ease 0.2s both; }
.nav-item:nth-child(1)    { animation: fadeInLeft 0.4s ease 0.3s both; }
.nav-item:nth-child(2)    { animation: fadeInLeft 0.4s ease 0.35s both; }
.nav-item:nth-child(3)    { animation: fadeInLeft 0.4s ease 0.4s both; }
.nav-item:nth-child(4)    { animation: fadeInLeft 0.4s ease 0.45s both; }
.nav-item:nth-child(5)    { animation: fadeInLeft 0.4s ease 0.5s both; }
.nav-item:nth-child(6)    { animation: fadeInLeft 0.4s ease 0.55s both; }
.sidebar-bottom           { animation: fadeIn 0.5s ease 0.7s both; }

.page-header { animation: fadeInUp 0.5s ease 0.1s both; }
.filter-bar  { animation: fadeInUp 0.5s ease 0.2s both; }

.kpi-value { animation: counterFloat 4s ease-in-out infinite; }
.kpi-card:nth-child(2) .kpi-value { animation-delay: 0.5s; }
.kpi-card:nth-child(3) .kpi-value { animation-delay: 1s; }
.kpi-card:nth-child(4) .kpi-value { animation-delay: 1.5s; }

.trust-bar-fill { transition: width 2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s; }

.card.reveal { opacity: 1; transform: translateY(0); animation: fadeInUp 0.4s ease both; }
.card.reveal.revealed { opacity: 1; transform: translateY(0); }

.nav-item.active .nav-icon { animation: pulse 2s ease-in-out infinite; }

.loading-dots { display: inline-flex; gap: 4px; }
.loading-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan, #00d4ff);
  animation: pulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-card * { transform-style: preserve-3d; }

.glitch-on-hover:hover { animation: glitch 0.3s ease; }

.border-pulse { animation: borderPulse 3s ease-in-out infinite; }

.section-tile:nth-child(1) { animation: fadeInUp 0.4s ease 1.0s both; }
.section-tile:nth-child(2) { animation: fadeInUp 0.4s ease 1.1s both; }
.section-tile:nth-child(3) { animation: fadeInUp 0.4s ease 1.2s both; }
.section-tile:nth-child(4) { animation: fadeInUp 0.4s ease 1.3s both; }
.section-tile:nth-child(5) { animation: fadeInUp 0.4s ease 1.4s both; }

.puzzle-widget { animation: slideInDown 0.5s ease 1.5s both; }

.waveform {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.waveform-bar {
  width: 3px;
  background: var(--cyan, #00d4ff);
  border-radius: 2px;
  animation: waveform 1.2s ease-in-out infinite;
}
.waveform-bar:nth-child(2) { animation-delay: 0.2s; }
.waveform-bar:nth-child(3) { animation-delay: 0.4s; }
.waveform-bar:nth-child(4) { animation-delay: 0.1s; }
.waveform-bar:nth-child(5) { animation-delay: 0.3s; }

.spin { animation: spin 1s linear infinite; }

.transition { transition: all 0.28s cubic-bezier(.4,0,.2,1); }
.transition-fast { transition: all 0.15s ease; }
.transition-slow { transition: all 0.5s cubic-bezier(.4,0,.2,1); }

.secret-reveal { animation: scaleIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.secret-text { animation: fadeInUp 0.6s ease 0.4s both; }
