/* ============================================================
   DreaInno Portfolio — Animations CSS
   PixelPoint-faithful keyframes + scroll-reveal system
   ============================================================ */

/* ── 1. Title Word Reveal (PixelPoint signature stagger) ── */
.title-word {
  display: inline;
  opacity: 0;
  transition: opacity 50ms ease, color 200ms ease;
}

/* ── 2. Scroll-Triggered Fade & Slide In ── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.stagger-delay-1 { transition-delay: 80ms; }
.stagger-delay-2 { transition-delay: 160ms; }
.stagger-delay-3 { transition-delay: 240ms; }
.stagger-delay-4 { transition-delay: 320ms; }
.stagger-delay-5 { transition-delay: 400ms; }

/* ── 3. Availability Pulse Beacon ── */
.status-beacon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background-color: rgba(0, 204, 118, 0.08);
  border: 1px solid rgba(0, 204, 118, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--color-accent-green);
  font-family: var(--font-mono);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: var(--color-accent-green);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}

.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background-color: var(--color-accent-green);
  opacity: 0.4;
  animation: pulseRing 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulseRing {
  0%   { transform: scale(0.9); opacity: 0.6; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ── 4. Hero Illustration: Gentle Float (Stage 1 Shapes) ── */
@keyframes ppFloat {
  0%   { transform: translateY(0px) rotate(0deg); }
  30%  { transform: translateY(-10px) rotate(0.8deg); }
  60%  { transform: translateY(5px) rotate(-0.5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* ── 5. Stage 2: Falling Objects ── */
@keyframes ppFall1 {
  0%   { transform: translateY(-220px) rotate(-12deg); opacity: 0; }
  20%  { opacity: 1; }
  65%  { transform: translateY(12px) rotate(2deg); }
  80%  { transform: translateY(-6px) rotate(-1deg); }
  92%  { transform: translateY(3px) rotate(0.5deg); }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; }
}

@keyframes ppFall2 {
  0%   { transform: translateY(-280px) rotate(18deg) scale(0.9); opacity: 0; }
  20%  { opacity: 1; }
  60%  { transform: translateY(16px) rotate(-3deg) scale(1.02); }
  80%  { transform: translateY(-8px) rotate(1deg) scale(0.99); }
  100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
}

/* ── 6. Stage 2: Pill rising from below ── */
@keyframes ppRise {
  0%   { transform: translateX(-50%) translateY(160px); opacity: 0; }
  30%  { opacity: 1; }
  65%  { transform: translateX(-50%) translateY(-10px); }
  82%  { transform: translateX(-50%) translateY(5px); }
  100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* ── 7. Stage 3: Fade-in for rail elements ── */
@keyframes ppFadeIn3 {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── 8. Stage 3: Toggle pill sliding down the rail ── */
@keyframes ppToggleSlide {
  0%   { top: 5%; right: 8%; opacity: 0; }
  8%   { opacity: 1; }
  100% { top: 72%; right: 52%; opacity: 1; }
}

/* ── 9. Feature Icon Animations ── */

/* Pixel grid pulse */
@keyframes fiGridPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; transform: scale(1.04); }
}

/* Wave line morph */
@keyframes fiWaveMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-20px); }
}

/* Dot bounce */
@keyframes fiDotBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* CMS pulse */
@keyframes fiCmsPulse {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; width: 100%; }
}

/* Git dot pulse */
@keyframes fiGitPulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50%       { transform: translateX(-50%) scale(1.3); }
}

/* Hub pulse */
@keyframes fiHubPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 0 0 0 rgba(43,75,238,0.5); }
  50%       { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 0 8px rgba(43,75,238,0); }
}

/* Bar grow */
@keyframes fiBarGrow {
  0%, 100% { opacity: 0.8; }
  50%       { opacity: 1; filter: brightness(1.3); }
}

/* ── 10. Services Section: Bar slide ── */
@keyframes svBarSlide {
  0%, 100% { transform: rotate(-45deg) translateX(0); }
  50%       { transform: rotate(-45deg) translateX(12px); }
}

/* ── 11. Smooth background color: hero grid ── */
.hero-canvas-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 60% 30%, black 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 60% 30%, black 15%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── 12. Mobile Hero & Services Dynamic Physics Animations ── */
@keyframes mobileHeroFloat1 {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1);
    filter: drop-shadow(0 10px 24px rgba(43, 75, 238, 0.2));
  }
  50% {
    transform: translateY(-14px) rotate(1.4deg) scale(1.018);
    filter: drop-shadow(0 18px 36px rgba(43, 75, 238, 0.38));
  }
  100% {
    transform: translateY(6px) rotate(-1deg) scale(0.995);
    filter: drop-shadow(0 8px 18px rgba(43, 75, 238, 0.16));
  }
}

@keyframes mobileHeroFloat2 {
  0% {
    transform: translateY(0px) perspective(700px) rotateX(0deg) rotateY(0deg);
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.5));
  }
  50% {
    transform: translateY(-16px) perspective(700px) rotateX(3deg) rotateY(-2.5deg) scale(1.015);
    filter: drop-shadow(0 22px 42px rgba(43, 75, 238, 0.28));
  }
  100% {
    transform: translateY(5px) perspective(700px) rotateX(-1.5deg) rotateY(1.5deg) scale(0.99);
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.4));
  }
}

@keyframes mobileHeroFloat3 {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1);
    filter: drop-shadow(0 10px 25px rgba(238, 43, 108, 0.2));
  }
  33% {
    transform: translateY(-18px) rotate(2deg) scale(1.025);
    filter: drop-shadow(0 20px 38px rgba(238, 43, 108, 0.35));
  }
  66% {
    transform: translateY(8px) rotate(-1.8deg) scale(0.985);
    filter: drop-shadow(0 8px 18px rgba(43, 75, 238, 0.25));
  }
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    filter: drop-shadow(0 10px 25px rgba(238, 43, 108, 0.2));
  }
}

@keyframes mobileServiceFloat1 {
  0% {
    transform: translateY(0px) scale(1);
    filter: drop-shadow(0 12px 26px rgba(43, 75, 238, 0.22));
  }
  50% {
    transform: translateY(-14px) scale(1.02);
    filter: drop-shadow(0 20px 40px rgba(43, 75, 238, 0.38));
  }
  100% {
    transform: translateY(5px) scale(0.995);
    filter: drop-shadow(0 8px 20px rgba(43, 75, 238, 0.16));
  }
}

@keyframes mobileServiceFloat2 {
  0% {
    transform: translateY(0px) scale(1);
    filter: drop-shadow(0 12px 26px rgba(15, 23, 42, 0.5));
  }
  50% {
    transform: translateY(-13px) scale(1.018);
    filter: drop-shadow(0 20px 38px rgba(37, 99, 235, 0.32));
  }
  100% {
    transform: translateY(4px) scale(0.992);
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.4));
  }
}

/* Feature icon ambient glow pulse on mobile */
@keyframes iconAmbientGlow {
  0%, 100% {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.08);
  }
  50% {
    box-shadow: 0 6px 22px rgba(43, 75, 238, 0.32), 0 0 0 2px rgba(43, 75, 238, 0.35);
    border-color: rgba(43, 75, 238, 0.45);
  }
}

.feature-icon-wrap {
  animation: iconAmbientGlow 4s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

.feature-item:active .feature-icon-wrap,
.feature-item:hover .feature-icon-wrap {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 10px 26px rgba(43, 75, 238, 0.45), 0 0 0 2.5px rgba(43, 75, 238, 0.55);
}

.feature-rive-canvas {
  filter: drop-shadow(0 2px 6px rgba(43, 75, 238, 0.25));
}

