/* ===== Micro-animaciones aprobadas - animar-interfaz ===== */
:root {
  --color-primario: #FF6B00;
  --color-secundario: #E65A00;
  --color-acento: #FF6B00;
  --color-fondo: #000000;
  --color-tarjeta: #18181B;
}

/* --- Fade-in al hacer scroll (.reveal) --- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hover en tarjetas (.tarjeta) --- */
.tarjeta {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tarjeta:hover {
  transform: translateY(-4px);
  border-color: var(--color-primario) !important;
  box-shadow: 0 12px 28px -10px rgba(255, 107, 0, 0.35);
}

/* --- Hover en botones (.btn) --- */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

/* --- Botón magnético (.btn-magnetico) --- */
.btn-magnetico {
  transition: transform 0.15s ease, background 0.2s ease;
  will-change: transform;
}

/* --- Subrayado animado en menú de navegación --- */
nav a {
  position: relative;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 2px;
  width: 0;
  background: var(--color-primario);
  transition: width 0.25s ease;
}
nav a:hover::after {
  width: 100%;
}

/* --- Barra CTA fija al hacer scroll --- */
.barra-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: rgba(24, 24, 27, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 107, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.barra-cta.visible {
  transform: translateY(0);
}

/* --- Shimmer al cargar imágenes --- */
.img-wrap.cargando::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-tarjeta) 25%, rgba(255, 255, 255, 0.08) 50%, var(--color-tarjeta) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Confirmación animada de formulario --- */
.confirmacion-envio {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.confirmacion-envio.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Accesibilidad: respeta 'prefers-reduced-motion: reduce' --- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .tarjeta, .btn, .btn-magnetico, nav a::after, .barra-cta, .img-wrap.cargando::before, .confirmacion-envio {
    transition: none !important;
    animation: none !important;
  }
}
