/* ============================================================
   YOANDY ARGUDÍN — SITIO WEB OFICIAL
   animations.css — Animaciones y efectos visuales
   ============================================================ */

/* ── ANIMACIONES DE ENTRADA (keyframes) ───────────────────── */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

/* ── BRILLO PLATEADO (shimmer) ────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* ── PULSO SUAVE ──────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── ROTACIÓN LENTA ───────────────────────────────────────── */
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── FLECHA DE SCROLL (rebote) ────────────────────────────── */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ── LÍNEA QUE CRECE ──────────────────────────────────────── */
@keyframes lineGrow {
  from { width: 0; opacity: 0; }
  to   { width: 100%; opacity: 1; }
}

/* ── BARRA PROGRESO (premios, habilidades) ────────────────── */
@keyframes barFill {
  from { width: 0%; }
  to   { width: var(--bar-width, 100%); }
}

/* ── PARPADEO CURSOR DE TEXTO ─────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── GRADIENTE EN MOVIMIENTO ──────────────────────────────── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── CLASES DE ANIMACIÓN REUTILIZABLES ────────────────────── */

.anim-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-smooth);
}

.anim-fade-in {
  opacity: 0;
  transition: opacity 0.8s var(--ease-smooth);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-smooth);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-smooth);
}

.anim-scale-in {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-smooth);
}

/* Cuando el elemento entra al viewport (clase añadida con JS) */
.anim-fade-up.is-visible,
.anim-fade-in.is-visible,
.anim-fade-left.is-visible,
.anim-fade-right.is-visible,
.anim-scale-in.is-visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* ── DELAYS DE ANIMACIÓN ──────────────────────────────────── */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }
.delay-700 { transition-delay: 0.7s; }
.delay-800 { transition-delay: 0.8s; }

/* ── ANIMACIONES DEL HERO ─────────────────────────────────── */

/* El eyebrow (texto pequeño arriba) */
.hero__eyebrow {
  animation: fadeUp 1s var(--ease-smooth) 0.3s both;
}

/* El nombre grande */
.hero__name {
  animation: fadeUp 1s var(--ease-smooth) 0.5s both;
}

/* El título profesional */
.hero__title {
  animation: fadeUp 1s var(--ease-smooth) 0.7s both;
}

/* Los botones del hero */
.hero__cta {
  animation: fadeUp 1s var(--ease-smooth) 0.9s both;
}

/* El scroll indicator */
.hero__scroll {
  animation: fadeIn 1s var(--ease-smooth) 1.2s both;
}

/* La imagen del fondo del hero */
.hero__bg img {
  animation: scaleIn 1.5s var(--ease-smooth) both;
}

/* ── SHIMMER EN TEXTO PLATEADO ────────────────────────────── */
.shimmer-text {
  background: linear-gradient(
    90deg,
    #a0a0a0 0%,
    #e8e8e8 30%,
    #c0c0c0 50%,
    #e8e8e8 70%,
    #a0a0a0 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ── FLECHA DE SCROLL (rebote continuo) ───────────────────── */
.scroll-arrow {
  animation: bounce 2s ease-in-out infinite;
}

/* ── NAVBAR ANIMACIÓN AL HACER SCROLL ─────────────────────── */
.navbar {
  animation: slideDown 0.6s var(--ease-smooth) 0.1s both;
}

/* ── LÍNEA DECORATIVA QUE CRECE ───────────────────────────── */
.line-grow {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 168, 179, 0.4), transparent);
  animation: lineGrow 1.2s var(--ease-smooth) both;
}

/* ── HOVER MAGNÉTICO EN BOTONES ───────────────────────────── */
.btn {
  transition: transform 0.3s var(--ease-smooth),
              box-shadow 0.3s var(--ease-smooth),
              background 0.3s var(--ease-smooth);
}

/* ── EFECTO PARALLAX LEVE EN CARDS ───────────────────────────*/
.album-card,
.edu-card {
  transition: transform 0.4s var(--ease-smooth),
              box-shadow 0.4s var(--ease-smooth),
              border-color 0.4s var(--ease-smooth);
  will-change: transform;
}

/* ── EFECTO DE CARGA INICIAL (page reveal) ────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--color-black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s var(--ease-smooth) both;
  transition: opacity 0.8s var(--ease-smooth);
}

.page-loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loader__text {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  letter-spacing: 0.2em;
  background: linear-gradient(
    90deg,
    #a0a0a0 0%,
    #e8e8e8 30%,
    #c0c0c0 50%,
    #e8e8e8 70%,
    #a0a0a0 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 1.5s linear infinite;
}

/* ── GRADIENTE DE FONDO ANIMADO ───────────────────────────── */
.animated-bg {
  background: linear-gradient(
    -45deg,
    #0a0a0a,
    #1d1d1f,
    #0a0a0a,
    #151517
  );
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
}

/* ── EFECTO HOVER EN GALERÍA ──────────────────────────────── */
.gallery__item {
  transition: transform 0.4s var(--ease-smooth);
}

.gallery__item:hover {
  transform: scale(1.02);
  z-index: 2;
}

/* ── REDUCIR MOVIMIENTO (accesibilidad) ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
