/* ============================================
   Vertex Pulse Global - Animations Stylesheet
   ============================================ */

/* ---- Keyframes ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Scroll-triggered reveal (IntersectionObserver) ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.12s; }
.stagger > *:nth-child(3) { transition-delay: 0.19s; }
.stagger > *:nth-child(4) { transition-delay: 0.26s; }
.stagger > *:nth-child(5) { transition-delay: 0.33s; }
.stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* ---- Hero entrance ---- */
.hero-label   { animation: fadeInUp 0.6s ease 0.2s both; }
.hero h1      { animation: fadeInUp 0.7s ease 0.35s both; }
.hero-subtitle{ animation: fadeInUp 0.7s ease 0.5s both; }
.hero-actions { animation: fadeInUp 0.7s ease 0.65s both; }
.hero-scroll  { animation: fadeIn 1s ease 1.2s both; }

/* ---- Typewriter cursor ---- */
.typewriter-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: #F5A623;
  margin-left: 3px;
  vertical-align: text-bottom;
  animation: blink 0.9s step-end infinite;
}

/* ---- Stat number count-up entrance ---- */
.stat-item { animation: countUp 0.6s ease both; }
.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

/* ---- Card hover glow ---- */
.card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(26,60,110,0.04), rgba(245,166,35,0.04));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::after { opacity: 1; }

/* ---- Floating icon ---- */
.float-icon { animation: float 4s ease-in-out infinite; }

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(135deg, #1A3C6E, #F5A623);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Animated gradient background ---- */
.animated-gradient {
  background: linear-gradient(270deg, #1A3C6E, #2a5ba8, #1A3C6E);
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

/* ---- Shimmer loading placeholder ---- */
.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ---- Page transition ---- */
.page-enter {
  animation: fadeIn 0.4s ease both;
}

/* ---- Navbar slide down ---- */
.navbar { animation: slideDown 0.5s ease both; }

/* ---- Tab content transition ---- */
.tab-content {
  display: none;
  animation: fadeInUp 0.4s ease both;
}
.tab-content.active { display: block; }

/* ---- Timeline ---- */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
}
.timeline-item {
  position: relative;
  margin-bottom: 40px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item::before {
  content: '';
  position: absolute; left: -28px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 3px var(--accent);
}
.timeline-year {
  font-size: 0.8rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 6px;
}
.timeline-item h3 { color: var(--text); margin-bottom: 6px; }
.timeline-item p { font-size: 0.9rem; }

/* ---- Progress bar ---- */
.progress-bar {
  height: 4px; border-radius: 2px;
  background: var(--border); overflow: hidden; margin-top: 8px;
}
.progress-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(to right, var(--primary), var(--accent));
  width: 0; transition: width 1.2s ease;
}

/* ---- Accordion / FAQ ---- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 20px 0; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 1rem; font-weight: 600; color: var(--text);
  transition: color var(--transition);
}
.faq-question:hover { color: var(--primary); }
.faq-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all var(--transition);
  font-size: 1.2rem; color: var(--primary);
}
.faq-item.open .faq-icon { background: var(--primary); color: var(--white); transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.3s ease; }
.faq-answer p { padding-bottom: 20px; }
.faq-item.open .faq-answer { max-height: 300px; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale,
  .timeline-item { opacity: 1; transform: none; }
}
