/* ==================== Codeisa — Animations CSS ==================== */

@keyframes section-in {
  from { opacity: 0; transform: translateY(12px) scale(.995); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-10px) translateX(5px); }
  50% { transform: translateY(-5px) translateX(-5px); }
  75% { transform: translateY(-15px) translateX(3px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 4px currentColor; opacity: .85; }
  50% { opacity: 1; filter: drop-shadow(0 0 8px currentColor); }
}

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

/* Page transition overlay */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  z-index: 100;
  pointer-events: none;
  transform-origin: right center;
}

/* Stagger children animation */
.stagger-children > * {
  animation: slide-up .5s var(--ease) both;
}
.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: .05s; }
.stagger-children > *:nth-child(3) { animation-delay: .1s; }
.stagger-children > *:nth-child(4) { animation-delay: .15s; }
.stagger-children > *:nth-child(5) { animation-delay: .2s; }
.stagger-children > *:nth-child(6) { animation-delay: .25s; }
.stagger-children > *:nth-child(7) { animation-delay: .3s; }
.stagger-children > *:nth-child(8) { animation-delay: .35s; }

/* Loader */
.loader {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2), var(--c-accent-3));
  z-index: 200;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.loader.loading { transform: scaleX(0.7); }
.loader.loaded { transform: scaleX(1); transition: transform .2s ease .1s; opacity: 0; }
