/* ============================================================
   DIGYNOMA — animations.css
   Keyframes globales y utilidades de animación
   ============================================================ */

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

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

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Clases de animación ─────────────────────────────────── */
.anim-fade-in {
  animation: fadeIn var(--duration-slow) var(--ease) both;
}

.anim-fade-up {
  animation: fadeUp var(--duration-slow) var(--ease) both;
}

.anim-scale-in {
  animation: scaleIn var(--duration-slow) var(--ease) both;
}

.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }

/* ── SVG decorativos del hero ────────────────────────────── */
.hero-deco-line {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s var(--ease);
}

.hero-deco-line.animated {
  stroke-dashoffset: 0;
}

/* ── Loading skeleton ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--c-border-lt) 25%,
    var(--c-paper-dk)  50%,
    var(--c-border-lt) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Underline animado en links ──────────────────────────── */
.animated-link {
  position: relative;
  display: inline-block;
}

.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-yellow);
  transition: width var(--duration-base) var(--ease);
}

.animated-link:hover::after {
  width: 100%;
}

/* ── Grid decorativo del hero ────────────────────────────── */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}
