/* ——— SCROLL REVEAL ——— */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ——— HERO STAGGERED WORD REVEAL ——— */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-word.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-sub {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}
.hero-sub.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-actions .btn-primary {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s,
              background 0.2s;
}
.hero-actions .btn-ghost {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s,
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.6s,
              border-color 0.2s, color 0.2s;
}
.hero-actions .btn-primary.visible,
.hero-actions .btn-ghost.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ——— STATS ANIMATION ——— */
.stats-band.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green-muted);
  opacity: 0;
  pointer-events: none;
  animation: stats-flash 0.8s ease-out forwards;
  z-index: 0;
}
@keyframes stats-flash {
  0% { opacity: 0.4; }
  100% { opacity: 0; }
}
.stat-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stat-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ——— PORTFOLIO CARD ANIMATIONS ——— */
.portfolio-card {
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.3s;
}
.portfolio-card.card-left { transform: translateX(-40px); }
.portfolio-card.card-right { transform: translateX(40px); }
.portfolio-card.visible {
  opacity: 1;
  transform: translateX(0);
}
.portfolio-card:hover {
  transform: scale(1.02) !important;
}
.portfolio-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--card-accent, var(--green)), transparent);
  background-size: 200% 100%;
  background-position: -200% 0;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.portfolio-card:hover::after {
  opacity: 1;
  animation: card-sweep 1.2s ease-in-out infinite;
}
@keyframes card-sweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ——— PERPETUAL MICRO-INTERACTIONS ——— */
.pc-status::before {
  animation: pulse-dot 2s ease-in-out infinite;
}
.portfolio-card.card-blue .pc-status::before { animation-delay: 0.4s; }
.portfolio-card.card-gold .pc-status::before { animation-delay: 0.8s; }
.portfolio-card.card-coral .pc-status::before { animation-delay: 1.2s; }
@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ——— ROADMAP ANIMATIONS ——— */
.roadmap-item {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.roadmap-item.visible {
  opacity: 1;
  transform: translateX(0);
}
.roadmap-item.pulse-dot::before {
  animation: dot-pulse 1s ease-out 2;
}
@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0,168,107,0.4), 0 0 0 4px var(--navy), 0 0 0 6px var(--green-muted); }
  70% { box-shadow: 0 0 0 12px rgba(0,168,107,0), 0 0 0 4px var(--navy), 0 0 0 6px var(--green-muted); }
  100% { box-shadow: 0 0 0 0 rgba(0,168,107,0), 0 0 0 4px var(--navy), 0 0 0 6px var(--green-muted); }
}
.roadmap-item.completed.pulse-dot::before {
  animation: dot-pulse-completed 1s ease-out 2;
}
@keyframes dot-pulse-completed {
  0% { box-shadow: 0 0 0 0 rgba(0,168,107,0.4), 0 0 0 4px var(--navy), 0 0 0 6px var(--green-muted); }
  70% { box-shadow: 0 0 0 12px rgba(0,168,107,0), 0 0 0 4px var(--navy), 0 0 0 6px var(--green-muted); }
  100% { box-shadow: 0 0 0 0 rgba(0,168,107,0), 0 0 0 4px var(--navy), 0 0 0 6px var(--green-muted); }
}
.roadmap-item.upcoming.pulse-dot::before {
  animation: dot-pulse-upcoming 1s ease-out 2;
}
@keyframes dot-pulse-upcoming {
  0% { box-shadow: 0 0 0 0 rgba(200,151,58,0.3), 0 0 0 4px var(--navy), 0 0 0 6px rgba(200,151,58,0.12); }
  70% { box-shadow: 0 0 0 12px rgba(200,151,58,0), 0 0 0 4px var(--navy), 0 0 0 6px rgba(200,151,58,0.12); }
  100% { box-shadow: 0 0 0 0 rgba(200,151,58,0), 0 0 0 4px var(--navy), 0 0 0 6px rgba(200,151,58,0.12); }
}

/* ——— JOURNEY STEP ANIMATIONS ——— */
.journey-step {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.journey-step.visible {
  opacity: 1;
  transform: translateY(0);
}
.journey-step .journey-step-icon {
  display: inline-block;
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.journey-step.visible .journey-step-icon {
  transform: scale(1);
}

/* ——— HERO DIAGRAM ORBIT ——— */
@media (min-width: 901px) {
  .hd-ring {
    animation: ring-spin 20s linear infinite;
  }
  .hd-ring-1 { animation-duration: 30s; animation-direction: normal; }
  .hd-ring-2 { animation-duration: 25s; animation-direction: reverse; }
  .hd-ring-3 { animation-duration: 35s; animation-direction: normal; }
  @keyframes ring-spin {
    to { transform: rotate(360deg); }
  }
  .holding-diagram:hover .hd-ring {
    animation-play-state: paused;
  }
}

/* ——— PARTICLE FIELD CONTAINER ——— */
#particle-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}
@media (max-width: 768px) {
  #particle-field { display: none; }
}

/* ——— REDUCED MOTION ——— */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .fade-up {
    opacity: 1;
    transform: none;
  }
  #scroll-progress { display: none; }
}
